Semiconductor device with arbitration system
By introducing a mapping counter and arbitration system into the semiconductor device, the requester with fewer licensed resources is given priority, which solves the problem of unfair resource allocation, realizes reasonable resource allocation and priority adjustment of requesters, and improves the efficiency and fairness of the system.
Patent Information
- Application Number
- CN202510640313.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-24
- Filing Date
- 2025-05-19
- Publication Date
- 2025-11-21
AI Technical Summary
In the prior art, arbitration systems fail to effectively take into account situations where some requesters can only access specific resources, resulting in unfair resource allocation. In particular, when resources are limited, requesters that can only use a small amount of resources may wait for a long time for resource allocation.
By combining a mapping counter with an arbitration system, the mapping counter is initialized and adjusted to prioritize the allocation of requesters with fewer licensed resources, ensuring that they are allocated priority when resources are available. The arbitration system is implemented in hardware to improve efficiency.
It achieves fairness and efficiency in resource allocation, avoids long waiting times for requesters that can only use a small amount of resources, and ensures reasonable resource allocation and priority adjustment of requesters.
Smart Images

Figure CN120994358A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to semiconductor devices and methods for allocating resources to a requester. Background Technology
[0002] In electronic circuits such as microcontrollers or computers, there may be multiple resources that can be used. Resources may include, for example, direct memory access modules (DMA), advanced encryption system engines (AES engines), or ports. Such resources can be accessed by one of several requesters. An arbitrator can receive requests for resources from the requesters and assign resources. If there are not enough resources available, the arbitrator determines which requester gets which resource.
[0003] In some cases, a particular requester may only use specific resources. This can be pre-programmed and / or determined by the hardware.
[0004] There is a need for an arbitration system and method that takes into account situations where some requesters may only be able to access specific resources. Summary of the Invention
[0005] In the example, a semiconductor device is provided, comprising:
[0006] Multiple resources are used for delivery services;
[0007] Multiple requesters that request access to the multiple resources, wherein each requester has a predetermined permission for a set of resources for which access is permitted, and wherein the requester can send a request message with a request for access to the resources.
[0008] A network connecting the plurality of resources and the plurality of requesters; and
[0009] An arbitration system is used to allocate resources to requesters.
[0010] It also includes: a mapping counter, which corresponds to each of the plurality of requesters.
[0011] The arbitration system is configured to initialize the mapping counter using a representation of the number of resources in the permitted resource set, and when resources become available, prioritize the allocation to the requester with the corresponding mapping counter indicating the lower number of resources in the permitted set.
[0012] In this way, requesters that are only permitted to use a smaller number of resources are given priority. This avoids a situation where, when some requesters can only use a limited number of resources, the resources are assigned to requesters with a large number of permitted resources instead of a small number when one of those resources becomes available, thus forcing requesters that are only permitted to access a smaller number of resources to wait a long time for one of their permitted small number of resources to become available.
[0013] In the example, the arbitration system and the mapping counter are implemented in hardware as separate blocks of one or more, rather than as software running on a core that uses main memory.
[0014] In the example, the arbitration system is configured to respond when a resource becomes available:
[0015] Prioritize allocating resources to the requester corresponding to the lower number of resources in the set with indicated permissions; and
[0016] Adjust the mapping counters for non-priority allocated resources to indicate a lower number of resources, and
[0017] The arbitration system is configured to respond when a previously used resource becomes available by the requester:
[0018] The mapping counters for the used resources are reinitialized using a representation of the number of resources in the permitted resource set.
[0019] In this way, the mapping counters of requesters who can use a large number of resources are initially set to be unfavorable to these requesters in the arbitrator, which favors requesters who can only use a limited number of resources. However, as a result, each time they are skipped for resource access, the mapping counters are adjusted to improve their priority. This ensures that resources that are permitted to use a large number of resources are not permanently unfavorable and actually get their turn. When a requester does get its turn to use a resource, the mapping counters are reinitialized.
[0020] The method thus balances the need to give higher priority to requesters that can only use a limited number of resources, so that when a resource becomes available to them, it is assigned to the requester with priority in order to avoid blocking requesters that can use many resources.
[0021] Those skilled in the art will recognize the additional features and advantages upon reading the following detailed description and reviewing the accompanying drawings. Attached Figure Description
[0022] The present disclosure is illustrated by way of example rather than limitation in the accompanying figures, and similar reference numerals in the figures refer to similar or identical elements. The elements in the figures are not necessarily proportional to each other. Features of the various illustrated examples can be combined unless they exclude each other.
[0023] Figure 1 The diagram illustrates a semiconductor device;
[0024] Figure 2 The diagram illustrates the resource allocation system;
[0025] Figure 3 This is a flowchart illustrating the use of the resource allocation system;
[0026] Figure 4 The diagram illustrates the resource allocation system;
[0027] Figure 5 The diagram illustrates the usage; and
[0028] Figure 6 The diagram illustrates a further system. Detailed Implementation
[0029] The examples described in this article illustrate semiconductor devices.
[0030] Figure 1 A semiconductor device is shown, having multiple valid requesters 10, 12, and 14, referred to as requester 0 (10), requester 1 (12), and requester 2 (14). Multiple resources 20 and 22 also exist, referred to as resource a (20) and resource b (22). Each valid requester may request access to one or more resources. To do so, an arbitration system 30 may assign requesters 10, 12, and 14 to resources 20 and 22. A network 18 connects requesters 10, 12, and 14 to the assigned resources 20 and 22.
[0031] In some cases, not all resources can be used by all requesters. For example, consider the following situation: requester 0 and requester 1 can use either resource a or resource b, but requester 2 can only use resource b.
[0032] Consider the case where the resource allocation system simply uses a round-robin method to determine the round. In this scenario, when resource 'a' becomes available, it can be allocated to requester 0, and when resource 'b' becomes available, it can be allocated to requester 1. If the next resource to become available is resource 'a', then it will be requester 2's turn, but requester 2 cannot use resource 'a'. In other words, a round-robin method that does not consider the fact that not all resources can be used by all requesters can lead to considerable delays in allocating resources to some requesters.
[0033] Therefore, as in Figure 2 As shown, resource allocation system 30 may include mapping counters 40, 42, and 44, each associated with a resource. Mapping counters 40, 42, and 44 may represent the number of resources available for the corresponding requesters 10, 12, and 14. In the example, the mapping counters may be initialized by subtracting 1 from the number of resources available for the corresponding requester. Figure 1 In the example, requester 0 can access two resources (resource a and resource b), and therefore initializes the mapping counter 40 corresponding to requester 0 with 1. The same applies to requester 1, so mapping counter 42 is also initialized with 1. Since requester 2 can only use resource b, mapping counter 44 is initialized with 0.
[0034] Those skilled in the art will recognize that the way the mapping counter represents the number of resources can be different. For example, the mapping counter can represent the number of resources plus or minus a constant k; in the example in the previous paragraph, the constant k is 1, but other values, such as k = 0, can be chosen, thus initializing the mapping counter to the number of available resources.
[0035] In use, the resource arbitration system 30 can operate as follows, such as in... Figure 3 As shown in the diagram.
[0036] First, initialize the 52 mapping counters 40, 42, and 44.
[0037] If requesters 10, 12, and 14 request resources, they can send message 50 corresponding to 53 to the resource arbitration system 30 to request the resources. When the resources become available, the resource arbitration system can then allocate the resources. In particular, the resource arbitration system can allocate 54 resources to the requester with the lowest mapping counter among those requesters who have already requested and are able to use the resources. If more than one requester meets this criterion, one of the requesters is selected, for example, by obtaining a round.
[0038] If a requester is not allocated resources as a result of its mapping counter being too high, the mapping counter used for that requester is decremented by 1 (58). This avoids always allocating resources to requesters who can only use a small amount of resources, and thus allows for a fairer balance among different requesters. Those skilled in the art will recognize that incrementing can be used instead of decrementing in an equivalent arrangement.
[0039] When a requester is allocated resources, the mapping counter used for that requester is reinitialized to 56 as a value representing the number of resources available for that requester.
[0040] In order to quickly allocate resources to requesters, the resource allocation system can be implemented in hardware rather than as code running on the kernel. Figure 4 The diagram illustrates a hardware resource allocation system 30 having a first filter 32, a second filter 34, and a polling arbitrator 36. Mapping counters 40, 42, and 44 are allocated to the second filter 34. An arbitration controller 38 is provided, which is connected to each of the first filter 32, the second filter 34, and the polling arbitrator 36.
[0041] During use, requesters 10, 12, and 14 that request the use of resources send corresponding messages 50 to the resource allocation system 30. When resources 20 and 22 become available, the first filter 32 filters out messages that cannot use the resource and passes messages from requesters that can use the resource to the second filter 34.
[0042] The second filter 34 then selects one or more resources 10, 12, 14 with the lowest mapping counters 40, 42, 44 from the messages 50 that have passed through the first filter and passes them to the arbitrator 36. Messages from resources that do not have the lowest mapping counter are filtered out, and the mapping counters corresponding to these resources are decremented by 1.
[0043] Arbitrator 36 then selects a resource from the resource with the lowest mapping counter. In the example described here, this is done using a polling arbitrator where the resource takes rounds.
[0044] Considering the above regarding Figure 1 The specific example described is that requester 0 and requester 1 can use both resource a and resource b, while requester 2 can only use resource b.
[0045] Assuming each requester 10, 12, and 14 requests resource allocation using the corresponding message, the resources will be allocated as follows. First, the arbitration controller 38 controls the arbitration system to allocate resource a as follows:
[0046] Resource 'a' can be used by requester 0 and requester 1 but not by requester 2. Therefore, filter 1 filters out messages from requester 2 and passes messages from requester 0 and requester 1 to filter 2.
[0047] The mapping counters corresponding to requester 0 and requester 1 are both 1. Therefore, the lowest mapping counter is 1, and thus both messages are passed to arbitrator 36. Since no messages are filtered out, no mapping counter is decremented.
[0048] Arbitrator 36 then selects one of the requesters. Assuming requester 0 is selected, resource 'a' is allocated to requester 0. The mapping counter 40 corresponding to requester 0 is then reinitialized to 1.
[0049] Next, the resource allocation system allocates resource b under the control of the arbitration controller 38.
[0050] In this case, requester 0 already has the resource (resource a), so only messages 50 from requesters 1 and 2 are retained. Both of them can use resource b, so both messages pass through the first filter 32.
[0051] In this case, the second filter 34 checks the mapping counter 42 with a value of 1 corresponding to resource 1 and the mapping counter 44 with a value of 0 corresponding to resource 2. The lowest mapping counter is correspondingly a value of 0, and therefore only the message corresponding to requester 2 passes through the second filter to arbitrator 36.
[0052] Since only messages from requester 2 are passed to arbitrator 36, arbitrator 36 simply assigns resource b to requester 2.
[0053] Since the second filter 34 has filtered out the message corresponding to requester 1, the corresponding mapping counter 42 is decremented and now has a value of 0. In this way, requester 1 effectively has a higher priority than requester 0 and the same priority as requester 2 for subsequent requests, which ensures that requester 1 should be able to use the resource whenever any of the resources becomes available next.
[0054] Figure 5 This demonstrates a specific application of the above methods.
[0055] In this case, multiple channels 100 are provided, which are fed into a switch matrix 110. The switch matrix 110 connects the channels to several resources, including, for example, AES engines 120 and 122. Other different resources 124 can also be provided.
[0056] Typically, any channel can access any AES engine, but in some security-related instances, a channel may request only odd-numbered or only even-numbered AES engines. By providing the arbitration system 30 described above, the inadequate allocation of resources to such channels can be minimized.
[0057] In the example above, all requesters have the same priority. Figure 6 The illustration shows further development, where different requesters are also assigned different priorities. This can be achieved with only very minor changes, especially in arbitrator 36, which is no longer a pure polling arbitrator but now considers priorities.
[0058] In this case, consider the following scenario: there are four requesters 10, 12, 14, and 16 and three available resources 20, 22, and 24, and the first requester 10 and the fourth requester 16 have high priority.
[0059] In the first round (a), resources are allocated to high-priority requesters 10 and 16, followed by one of the low-priority requesters, in this case, requester 12.
[0060] In the second round (b), resources are again allocated to high-priority requesters 10 and 16, followed by the next low-priority requester, which is requester 14 in this case.
[0061] Arbitrator 36 cycles through this scheme; in this example, all low-priority requesters have now been served, so the next round will serve the high-priority requesters, and then return to requester 12 to begin the cycle of repetition.
[0062] The above approach allows for scalable architectures that can be used across different chips within a series. In this scenario, some "low-end" chips in the series can have a limited number of requesters and resources, while other "high-end" chips can have a larger number of requesters and resources. The proposed approach is simple enough to be implemented in "low-end" chips while also having the ability to allocate resources in more complex "high-end" chips, allowing for a consistent architecture across the entire series.
[0063] While specific examples have been illustrated and described herein, those skilled in the art will appreciate that various alternative and / or equivalent implementations may be made in place of the specific examples shown and described without departing from the scope of the invention. This application is intended to cover any adaptations or variations of the specific examples discussed herein. Therefore, the invention is intended to be limited only by the claims and their equivalents.
[0064] It should be noted that the methods and apparatuses, including those with preferred embodiments outlined herein, can be used alone or in combination with other methods and apparatuses disclosed herein. Furthermore, features outlined in the context of the apparatus can also be applied to the corresponding methods, and vice versa. Moreover, all aspects of the methods and apparatuses outlined herein can be combined arbitrarily. In particular, the features of the claims can be combined with each other in any manner.
[0065] It should be noted that the specification and accompanying drawings only illustrate the principles of the proposed methods and systems. Those skilled in the art will be able to implement various arrangements, although not expressly described or shown herein, that embody the principles of the invention and are included within its spirit and scope. Furthermore, all examples and embodiments outlined in this document are intended primarily for illustrative purposes only to aid the reader in understanding the principles of the proposed methods and systems. Moreover, all statements herein providing the principles, aspects, and embodiments of the invention, along with specific examples thereof, are intended to cover their equivalents.
Claims
1. A semiconductor device, comprising: Multiple resources, each used to deliver the corresponding service; Multiple requesters that request access to the multiple resources, wherein each requester has a predetermined permission for a set of resources for which access is permitted, and wherein the requester can send a request message with a request for access to the resources. A network that connects the plurality of resources and the plurality of requesters; as well as An arbitration system, connected to a network, is used to allocate resources to requesters. It also includes: multiple mapping counters, each mapping counter corresponding to one of the multiple requesters. The arbitration system is configured to initialize the mapping counters using a representation of the number of resources in the permitted resource set, and to prioritize the requester with the corresponding mapping counter indicating the lower number when resources become available.
2. The semiconductor device as described in claim 1, The arbitration system is configured to respond when resources become available: Priority should be given to requesters with the corresponding mapping counters; and Adjust the mapping counters of non-priority requesters to indicate a lower number of resources, and The arbitration system is configured to respond when a previously used resource becomes available by the requester: The mapping counter corresponding to the requester of the resource being used is reinitialized using a representation of the number of resources in the permitted resource set.
3. The semiconductor device of claim 1, wherein the arbitration system comprises a mapped counter filter and an arbitrator. The mapping counter filter is configured to respond when a resource becomes available and at least one requester requests the resource: Pass request messages, or each request message, from a requester having a corresponding mapping counter indicating the minimum number of resources in the set of permissions from the requester requesting the resource through the filter; and Adjust the mapping counters for non-priority allocated resources to indicate a lower number of resources, and The arbitration system is configured to respond when a previously used resource becomes available by the requester: The mapping counter for used resources is reinitialized using a representation of the number of resources in the permitted resource set; and The arbitrator is configured to select one of the request messages that pass through the filter and allocate resources to the corresponding requester.
4. The semiconductor device of claim 3, wherein each requester has a priority, and the arbitrator is arranged to select one of the request messages that pass through the filter based on the priority of the respective requester.
5. The semiconductor device of claim 3 or 4, wherein the arbitrator is arranged to select one of the request messages that pass through the filter on a polling basis.
6. The semiconductor device as claimed in claim 3, 4 or 5, wherein: The number of resources used when the arbitration system initializes and reinitializes the mapping counter is represented by the number of resources in the set of permitted resources that is less than a certain constant.
7. The semiconductor device of claim 6, wherein the arbitration system is arranged to adjust the mapping counter of the requester corresponding to the non-priority allocated resource by decrementing one or more corresponding mapping counters.
8. The semiconductor device of claim 6 or 7, wherein the filter is arranged to allow request messages, or each request message, from the requester with the lowest mapped counter value among the requesters requesting the resource to pass through the filter.
9. A semiconductor device, comprising: Multiple resources are used to deliver the corresponding services; Multiple requesters that request access to the multiple resources, wherein each requester has a predetermined permission for a set of resources for which access is permitted, and wherein the requester can send a request message with a request for access to the resources. A network that connects the plurality of resources and the plurality of requesters; as well as An arbitration system, used to allocate resources to requesters, is connected to the network to receive request messages. in The arbitration system includes: A mapping counter, corresponding to each of the plurality of requesters, is used. The arbitration system is arranged to initialize the mapping counter with the corresponding number of resources from a set of permitted resources that is less than a certain constant. The first filter is used to filter request messages so that when a resource becomes available, the first filter only allows request messages that can use the resource to pass through; A second filter, having an input connected to the output of the first filter, is used to filter request messages passing through the first filter by selecting messages from the requester with the lowest available mapping counter. The arbitration system is configured to decrement the mapping counter of other requesters that have been filtered out by the second filter.
10. The semiconductor device of claim 9, wherein the arbitration system is further configured to reinitialize the requester's mapping counter using the number of resources in a set of permitted resources that is less than a constant when the requester has already been allocated resources.
11. The semiconductor device of claim 9 or 10, wherein the constant is 1.
12. The semiconductor device of claim 9, 10 or 11, further comprising a polling arbitrator connected to the output of the second filter for selecting one of the request messages to pass through the second filter.
13. A method of operating a semiconductor device, the semiconductor device comprising: Arbitration system; Multiple resources, each used to deliver the corresponding service; and multiple requesters that request access to the multiple resources, wherein each requester has a predetermined permission for a set of resources for which access is permitted; The method includes a network connecting the arbitration system, the plurality of requesters, and the plurality of resources, and the method comprises: (a) Initialize the mapping counter for that requester using a representation of the number of resources in the resource set for each requester's license; (b) Send a request message from the requester to request access to the resource; (c) Repeat step (b); and (d) When a resource becomes available, a requester is assigned to the resource first. The assigned requester has a corresponding mapped counter indicating the minimum number of resources in the set of permissions from those requesters who requested the resource.