[go: up one dir, main page]

CN117708008A - Polling arbitration method and device based on counter - Google Patents

Polling arbitration method and device based on counter Download PDF

Info

Publication number
CN117708008A
CN117708008A CN202311619726.9A CN202311619726A CN117708008A CN 117708008 A CN117708008 A CN 117708008A CN 202311619726 A CN202311619726 A CN 202311619726A CN 117708008 A CN117708008 A CN 117708008A
Authority
CN
China
Prior art keywords
counter
value
current
host
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311619726.9A
Other languages
Chinese (zh)
Inventor
孙昊鑫
王晓阳
何亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Kuixian Integrated Circuit Design Co ltd
Shanghai Kuixin Integrated Circuit Design Co ltd
Original Assignee
Hefei Kuixian Integrated Circuit Design Co ltd
Shanghai Kuixin Integrated Circuit Design Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Kuixian Integrated Circuit Design Co ltd, Shanghai Kuixin Integrated Circuit Design Co ltd filed Critical Hefei Kuixian Integrated Circuit Design Co ltd
Priority to CN202311619726.9A priority Critical patent/CN117708008A/en
Publication of CN117708008A publication Critical patent/CN117708008A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system
    • G06F13/362Handling requests for interconnection or transfer for access to common bus or bus system with centralised access control
    • G06F13/366Handling requests for interconnection or transfer for access to common bus or bus system with centralised access control using a centralised polling arbiter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system
    • G06F13/368Handling requests for interconnection or transfer for access to common bus or bus system with decentralised access control
    • G06F13/372Handling requests for interconnection or transfer for access to common bus or bus system with decentralised access control using a time-dependent priority, e.g. individually loaded time counters or time slot
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4027Coupling between buses using bus bridges
    • G06F13/4031Coupling between buses using bus bridges with arbitration

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Bus Control (AREA)

Abstract

The invention provides a polling arbitration method and a device based on a counter, which belong to the technical field of integrated circuits.

Description

Polling arbitration method and device based on counter
Technical Field
The present invention relates to the field of integrated circuits, and in particular, to a method and apparatus for polling arbitration based on a counter.
Background
In modern communication systems and integrated circuit systems, it is often the case that a plurality of masters are connected to a plurality of slaves. In these systems, to ensure the ordering and fairness of data transfers, data transfers and command transfers between devices often need to arbitrate to determine which host has the right to transfer data to transfer commands and data to the slaves.
There are typically three ways of arbitrating between the master and slave transmissions. The first is fixed priority arbitration, which is to set the priorities of different hosts in advance, and send commands sent by hosts with high priority preferentially when arbitration is needed; the second is the first to arrive first to process arbitration, this arbitration method is to arbitrate according to the priority order of the arrival of the transmission request, the earlier the request arrives, the higher the priority; the third is polling arbitration, which is to set a highest priority pointer, the pointer points to the position with highest priority, the pointer points to the next position with highest priority, and so on, the pointer points to the previous position with lowest priority, and after each response, the pointer with highest priority points to the next position responding to the request.
In the conventional polling arbitration method, the priority information is updated according to the granted request after each grant, that is, when the current request is polled, if the current request is granted, the next time the priority of the current request bit is polled is lowest. It should be noted that the priority change in the polling arbitration scheme is updated according to the grant of the request. If the request is unauthorized, the request may be in a lower priority position for a long time, and thus the request cannot be authorized for a long time, thereby affecting the response performance and the resource utilization rate of the system and affecting the fairness among the requests.
Disclosure of Invention
The invention provides a polling arbitration method and device based on a counter, which are used for solving the defect that a request cannot be authorized for a long time in the prior art and realizing the effect of fairly processing all the requests.
The invention provides a polling arbitration method based on a counter, which comprises the following steps:
receiving access request signals of a plurality of hosts;
determining a priority ordering of access request signals of a plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset;
polling a channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channel of the host is valid under the current polling;
in the case where the channel of the current host is valid under the current poll, the request of the current host is granted and the value of the counter is updated based on the counter update policy.
According to the method for arbitrating polling based on the counter provided by the invention, after the priority ordering of the access request signals based on the plurality of hosts polls the channel of each host and determines whether the channel of the host is valid under the current polling, the method further comprises:
under the condition that the channel of the current host is valid under the current polling, sequencing the priority of access request signals of a plurality of hosts according to the value of the current counter, and continuing to poll each host channel until the channel with the host is valid under the current polling;
requests from hosts that are active under the current poll are granted and the value of the counter is updated based on the counter update policy.
According to the method for polling arbitration based on the counter, the counting set of the counter is determined based on the number of access request signals of the host.
According to the polling arbitration method based on the counter, the number of the numerical values in the counting set of the counter is larger than or equal to the number of the access request signals of the host.
According to the method for polling arbitration based on the counter, the value of the counter is updated based on the counter updating strategy, and the method comprises the following steps:
when there is a value adjacent to the current counter value in the target size direction in the count set, the current counter value is updated to a value adjacent to the current counter value in the target size direction in the count set.
According to the method for polling arbitration based on the counter, the value of the counter is updated based on the counter updating strategy, and the method comprises the following steps:
in the case where there is no adjacent value in the target size direction within the count set for the current value of the counter, the value of the counter is updated to the first value in the target size direction within the count set.
According to the polling arbitration method based on the counter, the host is a system-on-chip.
The invention also provides a polling arbitration device based on the counter, which comprises:
the receiving module is used for receiving access request signals of a plurality of hosts;
a first processing module for determining a priority ordering of access request signals of the plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset;
the second processing module is used for polling the channel of each host based on the priority ordering of the access request signals of the hosts and determining whether the channel of the host is valid under the current polling;
and the third processing module is used for authorizing the request of the current host computer under the condition that the channel of the current host computer is valid under the current polling, and updating the value of the counter based on the counter updating strategy.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a counter-based poll arbitration method as described in any of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a counter-based poll arbitration method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a counter-based poll arbitration method as described in any of the above.
According to the polling arbitration method and device based on the counter, the counter is arranged, the priority orders of the access request signals of the corresponding multiple hosts are associated through the numerical values of the different counters, and the numerical value of the counter is updated under the condition that the channel of the current host is effective under the current polling, so that the configuration of the priority of the access request signals of the multiple hosts is realized, the numerical value of the counter can be continuously updated, the priority orders of the access request signals of the multiple hosts under each period can be changed, fairness among each request can be guaranteed, and all requests can be authorized to respond.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of the operation of a prior art poll arbiter;
FIG. 2 is a flow chart of a method for counter-based round robin arbitration provided by the present invention;
FIG. 3 is a schematic diagram of a counter-based poll arbitration device according to the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Before describing the method for polling arbitration based on the counter provided by the embodiment of the invention, a method for polling arbitration in the prior art is described.
In the prior art, the method of polling arbitration is to set a pointer with the highest priority, wherein the pointer points to the position with the highest priority, the pointer points to the next position with the second highest priority, and so on, the pointer points to the position with the lowest priority, and after each response, the pointer with the highest priority points to the next position responding to the request.
In the prior art, it is necessary to determine the number of hosts participating in a resource access and assign a unique identifier to each host. Each host is assigned a prioritization based on system requirements and specific policies. According to the priority order of the host, a circular sequence list is determined, and the host access is performed according to the sequence of the list. For example, the hosts may be ordered from high to low in priority and then a polling list may be constructed in this order. The system sequentially designates the next host to access the resource in the polling order. Each host sequentially acquires the access rights of the resources according to the sequence, and executes corresponding operations. After all hosts have performed one access, a new polling process is restarted, and the hosts are sequentially designated in the polling order to access the resource.
In the above conventional polling arbitration method, the priority information is updated according to the granted request after each grant, that is, when the current request is polled, if the current request is granted, the next polling is the lowest in priority. It should be noted that the priority change in the polling arbitration scheme is updated according to the grant of the request. If a request from a host is not valid, it may occur that the request is in a lower priority location for a long period of time.
As shown in fig. 1, the round robin arbiter has three sets of input requests in total: request 1, request 2 and request 3, the request priority pointers can point to three positions, namely 1, 2 and 3, and the priorities gradually decrease, and after polling arbitration, authorized requests are determined so as to correspond to different priorities.
When the request priority pointer points to 1, the request priority is: request 1> request 2> request 3.
When the request priority pointer points to 2, the request priority is: request 2> request 3> request 1.
When the request priority pointer points to 3, the request priority is: request 3> request 1> request 2.
If request 1 is granted, the request priority pointer is changed to 2. If request 2 is authorized, the request priority pointer is changed to 3. If request 3 is authorized, the request priority pointer is changed to 1.
The manner in which the round robin arbitration requests grants over a plurality of request cycles is as follows.
In cycle 1, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 1, and the granted request is 1.
In cycle 2, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 2, and the granted request is 2.
In cycle 3, request 1 is valid, request 2 is valid, request 3 is invalid, request priority pointer points to 3, and the granted request is 1.
In cycle 4, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 2, and the granted request is 2.
In cycle 5, request 1 is valid, request 2 is valid, request 3 is invalid, request priority pointer points to 3, and the granted request is 1.
In cycle 6, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 2, and the granted request is 2.
In cycle 7, request 1 is valid, request 2 is valid, request 3 is invalid, the request priority pointer points to 3, and the granted request is 1.
In cycle 8, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 2, and the granted request is 2.
In cycle 9, request 1 is valid, request 2 is valid, request 3 is invalid, the request priority pointer points to 3, and the granted request is 1.
In cycle 10, request 1 is valid, request 2 is valid, request 3 is valid, the request priority pointer points to 2, and the granted request is 2.
If this occurs, only request 1 or request 2 will be selected for each grant, and request 3 will never be granted.
Therefore, the method for the counter-based polling arbitration in the embodiment of the invention can enable the request 3 to be authorized, thereby improving the fairness of request authorization.
As shown in fig. 2, the counter-based polling arbitration method according to the embodiment of the present invention mainly includes step 210, step 220, step 230, and step 240.
Step 210, an access request signal of a plurality of hosts is received.
The case where multiple hosts are connected to multiple slaves is a very common scenario in modern communication systems and integrated circuit systems, called a multi-master multi-slave scenario. In this scenario, there are multiple devices as hosts, while multiple controlled devices or modules are connected as slaves.
For example, in the integrated circuit field, the host may be a master chip, and the slave may be a processor or the like at the periphery of the master chip.
In this case, access request signals of a plurality of masters to a certain slave channel may be received.
It will be appreciated that the appropriate manner may be selected to receive the access request signals of the plurality of hosts according to the application scenario. For example, a bus or network switch may be utilized to receive requests from a large number of connected computing nodes; in a cloud computing or virtualization environment, the access request signals of a plurality of hosts may be received by using a time-sharing system.
Step 220, determining the priority ordering of the access request signals of the plurality of hosts according to the value of the current counter.
It will be appreciated that the values of the different counters correspond to the prioritization of the access request signals of the different hosts, and that the prioritization of the access request signals of the hosts is determined based on the value of the current counter.
The correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset.
Step 230, polling the channels of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channels of the hosts are valid under the current poll.
Specifically, the access request signals of the plurality of hosts may be ordered by priority, and a request queue may be established, where the request is ordered in front with a high priority.
And polling the channels corresponding to each host in turn according to the priority from high to low. During the polling process, a request signal may be resent to each host and wait for its response.
After a request signal is sent on a channel of each host, a period of time is required to wait to determine if the channel is valid. If no response or an erroneous response is received within a specified time, the channel is deemed invalid.
Step 240, in case the channel of the current host is valid under the current poll, authorizing the request of the current host and updating the value of the counter based on the counter update policy.
In other words, if the channel is valid, data transmission or the like can be continued.
Of course, in some embodiments, after polling the channel of each host based on the priority ordering of the access request signals of the plurality of hosts and determining whether the channel of the host is valid under the current poll, the counter-based poll arbitration method of the embodiment of the present invention further includes: under the condition that the channel of the current host is valid under the current polling, sequencing the priority of access request signals of a plurality of hosts according to the value of the current counter, and continuing to poll each host channel until the channel with the host is valid under the current polling; requests from hosts that are active under the current poll are granted and the value of the counter is updated based on the counter update policy.
It will be appreciated that the value of the counter is updated only if the request is successful, and thus the priority ordering of the access request signals of the plurality of hosts in the next cycle is updated, so that the problem that some requests are in a low priority position for a long time and are not selected can be avoided.
According to the polling arbitration method based on the counter, the counter is set, the priority orders of the access request signals of the corresponding multiple hosts are associated through the values of the different counters, and the value of the counter is updated under the condition that the channel of the current host is effective under the current polling, so that the configuration of the priority of the access request signals of the multiple hosts is realized, the values of the counter can be continuously updated, the priority orders of the access request signals of the multiple hosts under each period can be changed, fairness among each request can be guaranteed, and all requests can be authorized to respond.
In some embodiments, the count set of the counter is determined based on the number of access request signals of the host.
It can be understood that the more the access request signals of the host, the more the priority order setting method between the access request signals of the host, and further, the more the count value of the counter needs to be set to meet the requirement.
In some embodiments, the number of values within the count set of the counter is greater than or equal to the number of access request signals to the host.
It can be appreciated that when the number of the values in the count set of the counters is greater than or equal to the number of the access request signals of the hosts, the access request of each host may correspond to the number of at least one counter, so that the access request signal of each host has the opportunity to obtain the highest priority, and thus the response to each request can be fairer.
In some embodiments, the requests of some hosts need to be set with higher weights so that the requests can be responded to more frequently, and the values of a plurality of counters can be corresponding to the hosts, so that the requests can be set according to actual requirements in different scenes.
The authorization condition of the access request signals of the hosts in the target response period can be counted, the duration of the target response period can be set according to the needs, and the access request signals of the hosts in the target response period are authorized at least once. The sum of the access request signals of the hosts authorized in the target response period may be counted first, and the frequency at which the access request signals of the different hosts are authorized in the target response period may be determined based on the sum of the authorizations and the number of times the access request signals of the hosts are authorized, respectively.
It will be appreciated that a fixed weight value may be set for each host, and the weight value may directly correspond to at least one value of the counter, where a larger weight value indicates a higher importance, so that the number of corresponding counter values is also larger, and thus the frequency of response authorization may be affected.
Dynamic weight adjustments may be made to achieve a more fair authorization. In other words, the magnitude of the weight value corresponding to the different hosts can be adjusted, so as to adjust the number of the values in the counter corresponding to the weight value of the different hosts.
For example, a higher first frequency threshold may be set, when the authorized frequency of a host in the target response period exceeds the first frequency threshold, and when the number of the counter corresponding to the current weight value of the host is greater than or equal to 2, the weight value of the host may be automatically reduced, so that the new weight value corresponds to a smaller number of values in the counter, thereby reducing the authorized frequency of the response of the host, and further ensuring that each host can be authorized more fairly.
Conversely, a lower second frequency threshold may be set, when the authorized frequency of a host in the target response period is less than the second frequency threshold, and the number of the counter corresponding to the current weight value of the host is less than or equal to 2, the weight value of the host may be automatically increased, so that the new weight value corresponds to a larger number of values in the counter, and further, the frequency of the response authorization of the host is increased, thereby ensuring that all hosts can be authorized more fairly.
In some embodiments, updating the value of the counter based on the counter update policy includes updating the value of the current counter to a value within the count set that is adjacent to the value of the current counter in the target size direction if there is a value within the count set that is adjacent to the value of the current counter in the target size direction.
The target size direction may be a large-to-small direction or a small-to-large direction. For example, when the target size direction is the direction from small to large and the values in the count set include 0, 1, 2, and 3, there are values in the count set adjacent to the value of the current counter in the direction from small to large for 0, 1, and 2. If the current counter value is 1, 1 is updated to a larger 2.
In some embodiments, updating the value of the counter based on the counter update policy includes: in the case where there is no adjacent value in the target size direction within the count set for the current counter value, the counter value is updated to the first value in the target size direction within the count set.
For example, when the target size direction is from small to large, and the values in the count set include 0, 1, 2, and 3, 3 is not adjacent to the current counter value in the small to large direction in the count set, that is, the current counter value is 3, and 3 is updated to the smallest 0.
In this embodiment, it may be ensured that each value of the counter may be updated to obtain a different value, thereby ensuring that the priority ranks of the access request signals of the plurality of hosts may be updated.
In this embodiment, it is assumed that the counter-based poll arbiter still has three sets of input requests: request 1, request 2, and request 3.
The set of counters is set to include values of 0, 1, 2 and 3. The updating mode is increment, namely updating is carried out according to the directions from small to large, and the initial value of the counter is 0.
The preset correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is the following.
When the counter value is 0, the request priority is: request 1> request 2> request 3.
When the counter value is 1, the request priority is: request 2> request 1> request 3.
When the counter value is 2, the request priority is: request 3> request 1> request 2.
When the counter value is 3, the request priority is: request 3> request 2> request 1.
The manner in which the round robin arbitration requests grants over a plurality of request cycles is as follows.
In cycle 1, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 0, and the granted request is 1.
In cycle 2, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 1, and the granted request is 2.
In cycle 3, request 1 is valid, request 2 is valid, request 3 is invalid, the counter value is 2, and the granted request is 1.
In cycle 4, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 3, and the granted request is 3.
In cycle 5, request 1 is valid, request 2 is valid, request 3 is invalid, the counter value is 0, and the granted request is 1.
In cycle 6, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 1, and the granted request is 2.
In cycle 7, request 1 is valid, request 2 is valid, request 3 is invalid, the counter value is 2, and the granted request is 1.
In cycle 8, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 3, and the granted request is 3.
In cycle 9, request 1 is valid, request 2 is valid, request 3 is invalid, the counter value is 0, and the granted request is 1.
In cycle 10, request 1 is valid, request 2 is valid, request 3 is valid, the counter value is 1, and the granted request is 2.
From the above results, even if the request 3 has a case where the authorization is invalid, the authorization can be obtained. In the embodiment, by adding the priority changing mechanism controlled by the counter, each request is ensured to have the opportunity to be selected, so that the fairness is improved, all requests can be considered, and the problem that some requests are in a low priority position for a long time and are not selected in the traditional polling arbitration is solved.
The counter-based polling arbitration device provided by the invention is described below, and the counter-based polling arbitration device described below and the counter-based polling arbitration method described above can be referred to correspondingly to each other.
As shown in fig. 3, the counter-based polling arbitration device according to the embodiment of the present invention mainly includes a receiving module 310, a first processing module 320, a second processing module 330, and a third processing module 340.
The receiving module 310 is configured to receive access request signals of a plurality of hosts;
the first processing module 320 is configured to determine a priority ranking of access request signals of the plurality of hosts according to a value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset;
the second processing module 330 is configured to poll the channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determine whether the channel of the host is valid under the current poll;
the third processing module 340 is configured to authorize a request of the current host if the channel of the current host is valid under the current poll, and update a value of the counter based on the counter update policy.
According to the counter-based polling arbitration device provided by the embodiment of the invention, the counter is arranged, the priority orders of the access request signals of the corresponding multiple hosts are associated through the numerical values of different counters, and the value of the counter is updated under the condition that the channel of the current host is effective under the current polling, so that the configuration of the priority of the access request signals of the multiple hosts is realized, the numerical values of the counter can be continuously updated, the priority orders of the access request signals of the multiple hosts under each period can be changed, the fairness among each request can be ensured, and all requests can be authorized to respond.
In some embodiments, the second processing module 330 is further configured to, in a case where the channel of the current host is valid under the current poll, continue to poll each host channel according to the priority ordering of the access request signals of the plurality of hosts determined by the value of the current counter until the channel of the existing host is valid under the current poll; requests from hosts that are active under the current poll are granted and the value of the counter is updated based on the counter update policy.
In some embodiments, the count set of the counter is determined based on the number of access request signals of the host.
In some embodiments, the number of values within the count set of the counter is greater than or equal to the number of access request signals to the host.
In some embodiments, the third processing module 340 is further configured to update the value of the current counter to a value within the count set that is adjacent to the value of the current counter in the target size direction if there is a value within the count set that is adjacent to the value of the current counter in the target size direction.
In some embodiments, the third processing module 340 is further configured to update the value of the counter to the first value in the target size direction within the count set if there are no adjacent values in the target size direction within the count set for the value of the current counter.
In some embodiments, the host is a system-on-chip
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. The processor 410 may invoke logic instructions in the memory 430 to perform a counter-based polling arbitration method comprising: receiving access request signals of a plurality of hosts; determining a priority ordering of access request signals of a plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset; polling a channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channel of the host is valid under the current polling; in the case where the channel of the current host is valid under the current poll, the request of the current host is granted and the value of the counter is updated based on the counter update policy.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the counter-based polling arbitration method provided by the methods above, the method comprising: receiving access request signals of a plurality of hosts; determining a priority ordering of access request signals of a plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset; polling a channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channel of the host is valid under the current polling; in the case where the channel of the current host is valid under the current poll, the request of the current host is granted and the value of the counter is updated based on the counter update policy.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the counter-based poll arbitration method provided by the methods above, the method comprising: receiving access request signals of a plurality of hosts; determining a priority ordering of access request signals of a plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset; polling a channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channel of the host is valid under the current polling; in the case where the channel of the current host is valid under the current poll, the request of the current host is granted and the value of the counter is updated based on the counter update policy.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A counter-based poll arbitration method, comprising:
receiving access request signals of a plurality of hosts;
determining a priority ordering of access request signals of a plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset;
polling a channel of each host based on the priority ordering of the access request signals of the plurality of hosts, and determining whether the channel of the host is valid under the current polling;
in the case where the channel of the current host is valid under the current poll, the request of the current host is granted and the value of the counter is updated based on the counter update policy.
2. The counter-based polling arbitration method of claim 1, wherein after said prioritizing of access request signals based on a plurality of hosts polls the channel of each host and determines whether the channel of the host is valid under the current poll, said method further comprises:
under the condition that the channel of the current host is valid under the current polling, sequencing the priority of access request signals of a plurality of hosts according to the value of the current counter, and continuing to poll each host channel until the channel with the host is valid under the current polling;
requests from hosts that are active under the current poll are granted and the value of the counter is updated based on the counter update policy.
3. The counter-based polling arbitration method of claim 1, wherein the count set of the counter is determined based on the number of access request signals of the host.
4. A counter-based polling arbitration method according to claim 3, wherein the number of values in the count set of the counter is greater than or equal to the number of access request signals of the host.
5. A counter-based polling arbitration method according to claim 3, wherein said updating the value of the counter based on a counter update policy comprises:
when there is a value adjacent to the current counter value in the target size direction in the count set, the current counter value is updated to a value adjacent to the current counter value in the target size direction in the count set.
6. The method of counter-based poll arbitration according to claim 4, wherein said updating the value of the counter based on a counter update policy comprises:
in the case where there is no adjacent value in the target size direction within the count set for the current value of the counter, the value of the counter is updated to the first value in the target size direction within the count set.
7. The method of claim 1, wherein the host is a system-on-chip.
8. A counter-based poll arbitration device, comprising:
the receiving module is used for receiving access request signals of a plurality of hosts;
a first processing module for determining a priority ordering of access request signals of the plurality of hosts according to the value of the current counter; the correspondence between the priority ordering of the access request signals of the plurality of hosts and the value of the counter is preset;
the second processing module is used for polling the channel of each host based on the priority ordering of the access request signals of the hosts and determining whether the channel of the host is valid under the current polling;
and the third processing module is used for authorizing the request of the current host computer under the condition that the channel of the current host computer is valid under the current polling, and updating the value of the counter based on the counter updating strategy.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the counter-based poll arbitration method of any of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the counter-based poll arbitration method according to any of claims 1 to 7.
CN202311619726.9A 2023-11-29 2023-11-29 Polling arbitration method and device based on counter Pending CN117708008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311619726.9A CN117708008A (en) 2023-11-29 2023-11-29 Polling arbitration method and device based on counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311619726.9A CN117708008A (en) 2023-11-29 2023-11-29 Polling arbitration method and device based on counter

Publications (1)

Publication Number Publication Date
CN117708008A true CN117708008A (en) 2024-03-15

Family

ID=90154334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311619726.9A Pending CN117708008A (en) 2023-11-29 2023-11-29 Polling arbitration method and device based on counter

Country Status (1)

Country Link
CN (1) CN117708008A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118409870A (en) * 2024-07-02 2024-07-30 沐曦科技(成都)有限公司 User arbitration system for GPU
CN119149461A (en) * 2024-08-28 2024-12-17 广东匠芯创科技有限公司 Multi-channel priority arbitration allocation method, system, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118409870A (en) * 2024-07-02 2024-07-30 沐曦科技(成都)有限公司 User arbitration system for GPU
CN119149461A (en) * 2024-08-28 2024-12-17 广东匠芯创科技有限公司 Multi-channel priority arbitration allocation method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN117708008A (en) Polling arbitration method and device based on counter
US5996037A (en) System and method for arbitrating multi-function access to a system bus
US7533206B2 (en) Resource management device
US8364874B1 (en) Prioritized polling for virtual network interfaces
JP2010286983A (en) Bus arbitration circuit and bus arbitration method
EP0383475A2 (en) Shared resource arbitration
US10261926B2 (en) Semaphore for multi-core processor
US11294835B2 (en) Semiconductor device including a bus arbiter
JPH04328665A (en) Multiprocessor and interrupt arbitrator thereof
US20100223409A1 (en) Bus arbitration apparatus and method
CN118885307B (en) Method and device for controlling access to shared resources, storage medium and electronic device
CN112506821A (en) System bus interface request arbitration method and related components
US7065595B2 (en) Method and apparatus for bus access allocation
EP2625619B1 (en) Arbitrating stream transactions based on information related to the stream transaction(s)
US8185679B2 (en) Controlling bus access
CN117520252B (en) Communication control method, system-level chip, electronic device and storage medium
JP5677007B2 (en) Bus arbitration device and bus arbitration method
KR100973419B1 (en) Bus Arbitration Method and Device
CN116820769A (en) Task allocation method, device and system
JP2000250853A (en) Bus arbitration controller
US8954643B2 (en) Scheduled peripheral component interconnect arbiter
CN109101443B (en) Weight time-sharing arbitration device and method
CN115269467B (en) Bus arbitration method and device, storage medium and electronic equipment
JPH10334042A (en) Bus arbitration control device method therefor, and recording medium recorded with bus arbitration control program
CN119938566A (en) A chip and a chip control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination