CN-121996589-A - Method and device for supporting multi-master peripheral equipment access polling arbitration
Abstract
The invention discloses a method and a device for supporting multi-master peripheral equipment to access and poll and arbitrate, the method comprises the steps of monitoring access requests of master equipment to target resources, judging whether the target resources can be arbitrated according to an arbiter enabling signal when detecting that a plurality of master equipment simultaneously send access requests to the target resources, if the target resources can be arbitrated, determining an arbitration mode according to a mode selection signal, selecting a corresponding arbiter according to the determined arbitration mode to arbitrate the plurality of master equipment so as to enable the master equipment to access the target resources according to an arbitration authorized sequence, ending and exiting; otherwise, access is not authorized to all master devices. The invention can determine the arbitration mode through the mode selection signal, can realize the integration of multiple arbitration modes, achieves the effect of multiple arbitration modes, can expand the arbitration mode and the arbiter according to the need, and has the advantages of good expansibility and high flexibility.
Inventors
- ZHANG JIANFENG
- WANG YONG
- FENG QUANYOU
- ZENG KUN
- ZHANG YING
- TIE JUNBO
- XUN CHANGQING
- ZHENG ZHONG
- GUO WEI
- HE XIAOWEI
- ZHAO ZHENYU
- ZENG PIN
- WANG YONGWEN
- FU WENWEN
- YANG QIANMING
- GONG RUI
- LIU WEI
- SHI WEI
- ZHANG JIAN
- QIAO YURAN
Assignees
- 中国人民解放军国防科技大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260409
Claims (10)
- 1. A method for supporting access polling arbitration of multi-master peripheral equipment is characterized by comprising the following steps: S101, monitoring access requests of the master control equipment to target resources, and jumping to the step S102 when detecting that a plurality of master control equipment simultaneously send out the access requests to the target resources; S102, judging whether the target resource can be arbitrated or not according to the arbiter enabling signal, if the target resource can be arbitrated, jumping to the step S103, otherwise, not authorizing access to all the master control equipment, ending and exiting; And S103, determining an arbitration mode according to the mode selection signal, selecting a corresponding arbiter according to the determined arbitration mode to arbitrate the plurality of master control devices so that the master control devices access the target resources according to the arbitration authorization sequence, ending and exiting.
- 2. The method for supporting multiple master peripheral device access poll arbitration according to claim 1, wherein in step S102, when determining whether the target resource is arbitratable according to the arbiter enable signal, the generation of the arbiter enable signal includes setting the arbiter enable signal to 1 if the target resource is not currently being accessed by the master device or the data transfer is already in an end state, setting the arbiter enable signal to 0 if the target resource is currently being accessed by the master device and the data transfer is not ended, determining whether the target resource is arbitratable according to the arbiter enable signal, if the arbiter enable signal is1, and otherwise determining that the target resource is not arbitratable.
- 3. The method for supporting multiple master peripheral device access polling arbitration according to claim 1, wherein when determining the arbitration mode according to the mode selection signal in step S103, the mode selection signal takes a value of 1 or 0, for determining that the arbitration mode is fair polling and weight polling, when the arbitration mode is fair polling, the single master device is sequentially granted access to the target resource in order of the master devices by the fair polling arbiter until no access request is made, and when the arbitration mode is weight polling, the single master device is sequentially granted access to the target resource in order of the master devices by the weight polling arbiter until no access request is made.
- 4. The method for supporting multiple master peripheral device access poll arbitration according to claim 3, wherein the fair poll arbiter comprises a first state update control module, a first response module and a plurality of first arbitration circuits corresponding to the master devices one by one, the first arbitration circuits comprise a first grant control module and a first mask control module, the first state update control module is used for generating a request signal req [ N:0] according to access requests of the plurality of master devices, and the mask signal mask [ N:0] returned by the first mask control module in the first arbitration circuits is inverted and then is calculated with the request signal req [ N:0] to obtain a new request signal new_ reqs [2N:0] to control the enabling of the first grant control modules in each first arbitration circuit, so that only the enabling signal of one first grant control module in the N first grant control modules is 1, and the enabling signals of the rest first grant control modules are 0, wherein N is the number of all master devices; the first authorization control module is used for respectively generating authorization signals to the first shielding control module and the first response module when the enabling signals are 1, the first shielding control module is used for generating shielding signal bits according to the authorization signals and outputting the shielding signal bits to the first state updating control module, the first shielding control module is respectively connected with the output end of the first authorization control module in the same first arbitration circuit, the input end of the first state updating control module, the output end of the first shielding control module in the previous first arbitration circuit and the input end of the first shielding control module in the next first arbitration circuit, if the authorization signals output by the output ends of the first authorization control modules are high level, the first shielding control module generates a corresponding shielding signal mask [ N:0] and sends the shielding signal mask [ N:0] to the first state updating control module, if the authorization result is low level, the shielding signal mask [ N:0] is kept unchanged from the authorization signal of the first shielding control module in the last first arbitration circuit, and the first response modules are respectively connected with the output ends of the first authorization control modules in the first arbitration circuits and are used for authorizing corresponding single master control equipment to sequentially access target resources according to the authorization signals output by the first shielding control modules in the first arbitration circuits until no access request exists.
- 5. The method for supporting multiple master peripheral device access poll arbitration according to claim 4, wherein the fair poll arbiter comprises four first arbitration circuits, and when the first mask control module generates the corresponding mask signal mask [ N:0] and sends the mask signal mask [ N:0] to the first state update control module, if the first mask control module is the first mask control module in the first arbitration circuit, the mask signal mask [ N:0] is 4'b0001, if the first mask control module is the first mask control module in the second first arbitration circuit, the mask signal mask [ N:0] is 4' b0011, if the first mask control module is the first mask control module in the third first arbitration circuit, the mask signal mask [ N:0] is 4'b0111, and if the first mask control module is the first mask control module in the fourth first arbitration circuit, the mask signal mask [ N:0] is 4' b1111.
- 6. The method of claim 3, wherein the weighted round robin arbiter comprises a second state update control module, a weight control module, a second response module, and a plurality of second arbitration circuits corresponding to the master control devices one by one, the second arbitration circuit comprises a second grant control module and a second mask control module, the second state update control module is configured to generate a request signal req [ N:0] according to access requests of the plurality of master control devices, the mask signal mask [ N:0] returned by the second mask control module in the second arbitration circuit is inverted with the request signal req [ N:0] and calculated to obtain a new request signal new_ reqs [2N:0] as an input of the weight control module, the weight control module is configured to control enabling of the second grant control module in each second response module by the new request signal new_ reqs [2N:0] and an externally input weight signal, the mask control module is enabled by one of the N second grant control modules, the mask control modules in the N second grant control modules is enabled by the second grant control modules, the second mask control modules are enabled by the second grant control modules at the same end, the second mask control modules are enabled by the second grant control modules, the same end is enabled by the second grant control modules, and the second mask control modules are enabled by the second mask control modules at the same end, and the output to the second mask control modules are enabled by the second mask control modules, and the first and the second mask control modules are enabled by the second mask control module, and the second control module are enabled by the second control module, and the appropriate control module are enabled by the corresponding to the control signals and the control module are respectively, and the second response module is respectively connected with the output ends of the second authorization control modules in the second arbitration circuits, and is used for sequentially accessing the target resources according to the single master control equipment corresponding to the authorization signals output by the second shielding control modules in the second arbitration circuits until no access request is made, if the authorization result is low level, the shielding signal mask [ N:0] is kept unchanged with the authorization signals of the second shielding control modules in the last second arbitration circuit.
- 7. The method for supporting multiple master peripheral device access poll arbitration according to claim 6, wherein the weight control module is configured to control enabling of the second grant control module in each second response module by using a new request signal new_ reqs [2n:0] and an externally input weight signal, and the method is characterized in that the method comprises generating an internal weight signal weight according to the externally input weight signal, wherein the internal weight signal weight comprises 2N bits, N is the number of all master devices, the upper N bits are weight information of the master devices in a polling cycle, the lower N bits are weight information of the master devices in a polling cycle, and the upper N bits and the lower N bits are different in that the lower N bits contain master device information of last grant in a previous polling cycle when the weight is reset, and the upper N bits do not contain the master device information; the value of each bit in the new request signal new_ reqs [2N:0] is circularly judged, the first 1 value from the low bit is found, if the first 1 value position indicates that the ith N master control equipment is polled in sequence when the new_ reqs [ i ] represents that the ith N master control equipment is polled, wherein i=0, 1, 2N-1, the value of the weight [ i ] of the ith N master control equipment is judged to be a non-0 value, if the non-0 value represents that the master control equipment has the authorization times, the enabling signal of the corresponding second arbitration circuit is set to be1 so as to enable the second arbitration circuit to start to work, otherwise, when the value of the weight [ i ] of the ith N master control equipment is 0 value, the first arbitration circuit is not effective, the master control equipment is not authorized, the next 1 value is continuously found, whether the second arbitration circuit works is judged in the same way, until a second arbitration circuit is found that can operate efficiently.
- 8. An apparatus for supporting multiple master peripheral device access poll arbitration comprising a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to perform the method for supporting multiple master peripheral device access poll arbitration of any of claims 1 to 7.
- 9. A computer readable storage medium having stored therein a computer program or instructions, the computer program or instructions being programmed or configured to perform the method for supporting multi-master peripheral access poll arbitration of any of claims 1-7 by a processor.
- 10. A computer program product comprising a computer program or instructions programmed or configured to, when executed by a processor, perform the method of supporting multiple master peripheral device access poll arbitration of any of claims 1 to 7.
Description
Method and device for supporting multi-master peripheral equipment access polling arbitration Technical Field The invention belongs to the technical field of priority scheduling of chip resources, and particularly relates to a method and a device for supporting multi-master peripheral equipment to access and poll and arbitrate. Background With the development of integrated circuits, the internal integration level of a chip is continuously improved, the coupling between different devices is gradually tight, and in the use of resources of the chip, one resource or device is accessed by a plurality of devices at the same time, so that the priority scheduling control of the resources in the chip becomes particularly important. One peripheral in the chip can only be occupied by one master control device at a time, and when a plurality of master control devices initiate access requests at the same time, an access conflict condition can occur. How to avoid the conflict situation generated when multiple master control devices access peripheral devices simultaneously has become a key technical problem to be solved. Disclosure of Invention Aiming at the problems in the prior art, the invention provides the method and the device for supporting the multi-master peripheral equipment to access and poll the arbitration, which can determine the arbitration mode through the mode selection signal, can realize the fusion of multiple arbitration modes, achieves the effect of the multiple arbitration modes, can expand the arbitration mode and the arbiter as required, and has the advantages of good expansibility and high flexibility. In order to solve the technical problems, the invention adopts the following technical scheme: A method for supporting multi-master peripheral device access polling arbitration includes the following steps: S101, monitoring access requests of the master control equipment to target resources, and jumping to the step S102 when detecting that a plurality of master control equipment simultaneously send out the access requests to the target resources; S102, judging whether the target resource can be arbitrated or not according to the arbiter enabling signal, if the target resource can be arbitrated, jumping to the step S103, otherwise, not authorizing access to all the master control equipment, ending and exiting; And S103, determining an arbitration mode according to the mode selection signal, selecting a corresponding arbiter according to the determined arbitration mode to arbitrate the plurality of master control devices so that the master control devices access the target resources according to the arbitration authorization sequence, ending and exiting. Optionally, in step S102, when judging whether the target resource is arbitratable according to the arbiter enabling signal, the generating of the arbiter enabling signal includes setting the arbiter enabling signal to be 1 if the target resource is not currently being accessed by the master device or the data transmission is already in an end state, setting the arbiter enabling signal to be 0 if the target resource is currently being accessed by the master device and the data transmission is not ended, and judging whether the target resource is arbitratable according to the arbiter enabling signal if the arbiter enabling signal is 1, otherwise judging that the target resource is not arbitratable. Optionally, in step S103, when the arbitration mode is determined according to the mode selection signal, the value of the mode selection signal is 1 or 0, which is used for determining that the arbitration mode is fair polling and weighted polling, when the arbitration mode is fair polling, the single master device is sequentially authorized to sequentially access the target resource by the fair polling arbiter according to the sequence of the master devices until no access request is made, and when the arbitration mode is weighted polling, the single master device is sequentially arbitrated to sequentially access the target resource by the weighted polling arbiter according to the weight of the master device until no access request is made. Optionally, the fair polling arbiter includes a first state update control module, a first response module, and a plurality of first arbitration circuits corresponding to the master control devices one to one, where the first arbitration circuit includes a first grant control module and a first mask control module, where the first state update control module is configured to generate a request signal req [ N:0] according to access requests of the plurality of master control devices, and invert a mask signal mask [ N:0] returned by the first mask control module in the first arbitration circuit, and then calculate the mask signal req [ N:0] to obtain a new request signal new_ reqs [2N:0] to control enabling of the first grant control modules in each first arbitration circuit, so that enabling signals of only one first gra