WO2012000365A1 - 一种优先级仲裁方法及装置 - Google Patents

一种优先级仲裁方法及装置 Download PDF

Info

Publication number
WO2012000365A1
WO2012000365A1 PCT/CN2011/075011 CN2011075011W WO2012000365A1 WO 2012000365 A1 WO2012000365 A1 WO 2012000365A1 CN 2011075011 W CN2011075011 W CN 2011075011W WO 2012000365 A1 WO2012000365 A1 WO 2012000365A1
Authority
WO
WIPO (PCT)
Prior art keywords
priority
request
level
arbiter
task
Prior art date
Application number
PCT/CN2011/075011
Other languages
English (en)
French (fr)
Inventor
余金清
肖礼盛
陈德炜
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to US13/522,542 priority Critical patent/US9372715B2/en
Priority to EP11800110.6A priority patent/EP2515232B1/en
Publication of WO2012000365A1 publication Critical patent/WO2012000365A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Definitions

  • the second stage priority arbitrator returns an output result to the corresponding first level polling arbiter
  • a setting unit configured to separately set priorities of the plurality of source ends.
  • the device also includes:
  • the priority of the request task is not changed.
  • Figure 2 is a schematic diagram of an existing fixed priority arbitration
  • Figure 3 is a schematic diagram of an existing cyclic priority arbitration
  • Figure 4 is a schematic diagram of an existing polling arbitration
  • FIG. 5 is a flowchart of a priority arbitration method according to an embodiment of the present invention.
  • FIG. 6 is a block diagram of a priority arbitration apparatus according to an embodiment of the present invention.
  • FIG. 7 is a block diagram showing a preferred structure of a dynamic priority arbitration apparatus according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a command effective unit work process according to an embodiment of the present invention;
  • FIG. 9 is a request map according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of a priority request processing unit operation process according to an embodiment of the present invention
  • FIG. 11 is a flowchart of a first-level arbitration unit operation process according to an embodiment of the present invention
  • FIG. 12 is a flowchart according to an embodiment of the present invention. Flow chart of the work process of the secondary arbitration unit. detailed description
  • a priority arbitration method is provided.
  • the above technical solution combines a fixed-priority and polling mode two-level arbitration processing structure, which can be grouped and hierarchically processed, and improves the processing efficiency compared with the existing single arbitration mechanism when the request task is large.
  • the priority of the source end can be flexibly configured according to actual needs, which can also achieve fairness.
  • each priority maps a first-level arbiter
  • the task of the same priority request is assigned to the corresponding first-level arbitration process, which specifically includes:
  • the source end request priority effective time and the fourth step polling the arbiter corresponding priority level establish a one-to-one mapping relationship between the source end and the polling arbiter.
  • Each first-level arbiter outputs an arbitration result to the second-level arbitration in the manner of polling.
  • the number of source requests counted in the fifth step is outputted by the third-step polling method.
  • the second-level arbitration After the second-level arbitration receives the first-level arbitration request, it shall follow the priority of the task. The highest output priority task.
  • the arbitration result outputted by the sixth-stage first-stage arbiter is outputted in accordance with the third-step full priority processing method.
  • the result of the seventh step is fed back to the first level arbiter, indicating that the task has been responded by the second level arbiter, and then polling for the request of another same priority task, including:
  • the arbitration result outputted in the seventh step is fed back to the corresponding first-stage arbiter according to its corresponding bit.
  • the bit corresponding to source 0 is the 0th bit
  • the bit corresponding to source 1 is the 1st bit. 2
  • the corresponding bit is the second bit;
  • the output response result fed back to the first stage arbiter is sent to the corresponding first stage arbiter.
  • the corresponding source request task is cleared, and the total number of source requests is reduced by one (or bit is cleared).
  • a priority arbitration apparatus is also provided.
  • FIG. 6 is a block diagram of a priority arbitration apparatus according to an embodiment of the present invention. As shown in FIG. 6, the apparatus includes:
  • a request mapping priority and holding unit 10 configured to receive task request signals from a plurality of source request tasks, and assign the same priority request tasks to the same first level polling arbiter; wherein, the first level polling The number of arbiters is the same as the number of priorities included in the plurality of source ends; a plurality of first level polling arbiters 20, wherein each of the first level polling arbiters is configured to respectively receive the plurality of priorities of the same Requesting a task polling process to get a request task, and requesting the task Delivered to the second-level priority arbiter; the second-level priority arbiter 30 is configured to receive a plurality of request tasks from the plurality of first-level polling arbiter, and output the highest-priority request task to the destination end Output the result.
  • the embodiment of the present invention is applied to a plurality of source ends corresponding to one destination end.
  • the arbitration mechanism implemented by the embodiment of the present invention is to enable the source of the plurality of source ends to dynamically obtain the data of the destination end.
  • FIG. 7 is a block diagram showing a preferred configuration of a dynamic priority arbitration apparatus according to an embodiment of the present invention.
  • 4 sets the source to request data from the destination.
  • the apparatus further includes: a plurality of configuration priority command effective units (ie, command effective units), a plurality of priority request processing units, and a setting unit (not shown in the figure) Show), used to set the priority of multiple sources separately.
  • three configuration priority command effective units ie, command effective units
  • each configuration priority command effective unit works independently in parallel to determine external configuration (or change). Whether the priority of each source takes effect.
  • FIG. 8 is a flowchart of a work process of a command effective unit according to an embodiment of the present invention.
  • the new priority command corresponding to source 0 is output, that is, source 0 is required to update its task priority request; when the source 0 change priority command is received, it is judged Whether the first-stage arbiter of the corresponding priority mapping before source 0 is in the idle state, and if it is in the idle state, the source 0 new priority command is valid, otherwise the first-level arbitration of the priority mapping corresponding to the source 0 is waited for.
  • the device enters an idle state.
  • source 0, source 1, and source 2 will map their task requests to their corresponding priority first-level arbiter according to the priority configured by the external command.
  • the priority of source 0 is configured from 0 priority to 1 priority by external command configuration.
  • source 0 The task request is processed by the requesting first level arbiter 0 to process its task request, and becomes the first level arbiter 1 to process its task request.
  • the first level arbiter 0 is dedicated to processing the task request with priority 0; the first level arbiter 1 is dedicated to processing the task request with priority 1.
  • FIG. 10 is a flowchart of a priority request processing unit work process according to an embodiment of the present invention.
  • the priority request processing unit collects the number of each source request task into the first level arbiter. If the first-stage arbiter with arbitration priority is 0, when the arbiter still arbitrates the processing output request, or has arbitrated the output result, but the second-level arbitration does not respond to the first-level arbitration, the priority request processing unit Each task request corresponding to this priority will continue to be collected; otherwise, the collected task request is sent to the corresponding first-level arbiter, and the task request is re-collected.
  • the method for collecting task requests for each priority is the same here.
  • 11 is a flow chart showing the processing of the first level arbitration unit (i.e., polling arbiter) in accordance with an embodiment of the present invention.
  • the arbitrator After judging that there is an external task request, the arbitrator enters the collection task request state, and after collecting the task, enters the arbitration process, and the arbitration process uses the polling mode, that is, the priority of each task request is the same.
  • the first-stage arbiter with priority 0 mapping as an example, 4 sets source 0, source 1 and source 2 have the same priority and both are 0, while source 0, source 1, and source 2 have task requests.
  • the arbiter only judges that these sources have task requests, but does not judge how many task requests each source has, that is, each source can only send one task request to the first-level arbiter of the corresponding priority at a time.
  • the first-stage arbiter uses the polling mode to output the arbitration result to the second-stage arbiter. Assuming that the first-level arbitration output is the source 0 request, the source 0 is sent to the second-level arbiter, waiting for the second-level arbitration.
  • FIG. 12 is a flow diagram showing the processing of the second level arbitration unit (i.e., priority arbiter) in accordance with an embodiment of the present invention.
  • the second-stage arbiter receives the output request from the first-stage arbiter in the idle state.
  • the second-stage arbiter enters the arbitration processing state, in all the first-level arbitration requests.
  • the request of the first-level arbiter with the highest priority is output.
  • the second level arbiter then returns to the idle state, and then the next request is processed, at which point another task request for the first stage arbiter of the response can be received.
  • the second-stage arbiter After the second-stage arbiter outputs the request, it feeds back the output result to the corresponding first-stage arbiter.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bus Control (AREA)

Abstract

本发明公开了一种优先级仲裁方法及装置,其中该方法包括:分别设置第一级轮询仲裁器以及第二级优先级仲裁器,其中,第一级轮询仲裁器的数量与多个源端包括的优先级的数量相同;接收来自多个源端请求任务的任务请求信号,并将优先级相同的请求任务分配至同一第一级轮询仲裁器;每个第一级轮询仲裁器分别将接收到的多个优先级相同的请求任务轮询处理得到一个请求任务,并将该请求任务输送至第二级优先级仲裁器;第二级优先级仲裁器接收到多个请求任务,并向目的端输出优先级最高的请求任务的输出结果。通过本发明,能够同时融合固定优先级、轮询方式和动态优先级三种仲裁机制,提高了仲裁处理效率。

Description

一种优先级仲裁方法及装置 技术领域
本发明涉及通讯领域, 尤其涉及一种优先级仲裁方法及装置。 背景技术
在设计中, 源端和目的端存在三种对应关系: 一对一, 一对多和多对 一。 其中以多个源端对应一个目的端关系最为复杂, 电路结构如图 1所示。 多个源端通过多路选择器(MUX )连接至目的端, 它需要一套仲裁机制辅 助工作, 以保证多个源端能分时与目的端数据交互。
仲裁机制的基本原理是根据各个源端的请求信号, 按照某种仲裁原则 , 产生选通信号, 使得对应的源端能分时与目的端数据交互。 仲裁原则通常 分为三种: 固定优先级、 循环优先级、 轮询优先级。
一、 固定优先级。 如图 2所示, 分别规定每个源的优先级, 图中 0代 表优先级最高, 2代表优先级最低, 仲裁时每次都依照优先级由高到低的顺 序响应源端请求。 例如: 当源 0和源 2同时请求数据时, 依照优先级规则, 源 0的优先级比源 2高, 因此先响应源 0的请求, 待源 0响应结束后, 再 重新确认源 0和源 1都无请求的情况下, 才响应源 2的请求。
二、 循环优先级。 如图 3 所示, 每当优先级最高的源端被响应时, 都 将此优先级最高的源端设为最低优先级, 余者优先级依次提高, 从而使得 每个源端在循环中都能获得平等优先级。 图中 0代表优先级最高, 2代表优 先级最低, 仲裁时每次都依照当前优先级由高到低的顺序响应源端请求。 例如: 当源 0和源 2同时请求数据时, 先设置源 0的优先级为 0, 源 2的优 先级为 2, 则源 0的优先级高于源 2, 于是先响应源 0的请求。 待源 0响应 结束后, 重新设定源 0的优先级为 2, 源 1的优先级为 0, 源 2的优先级为 1。 此时只须确定源 1无请求, 便可响应源 2的请求, 而无须再关心源 0是 否有请求。
三、 轮询优先级。 如图 4所示, 源 0、 1和 2处在同一优先级。 例如: 若每个源有多个任务同时请求, 则执行的方式为, 分别输出源 0、 1和 2的 一个任务, 依次类推, 若其中一个源任务处理完, 假设为源 0 不再请求仲 裁, 则下次输出源 1与源 2的任务。 同理, 若源 2不再请求输出, 则仲裁 输出源 0与源 1的请求。
由上面的描述可知, 三种仲裁机制的处理过程单一, 不能灵活地根据 数据的需要来配置仲裁机制的处理方式, 如果遇到更多的源同时请求时, 处理效率会降低, 并且可移植性不高。 发明内容
本发明提供一种优先级仲裁方法及装置, 能够灵活运用仲裁原则, 提 高处理效率, 且可移植性高。
根据本发明实施例的优先级仲裁方法包括:
分别设置第一级轮询仲裁器以及第二级优先级仲裁器, 其中, 第一级 轮询仲裁器的数量与多个源端包括的优先级的数量相同;
接收来自多个源端请求任务的任务请求信号, 并将优先级相同的请求 任务分配至同一第一级轮询仲裁器;
每个第一级轮询仲裁器分别将接收到的多个优先级相同的请求任务轮 询处理得到一个请求任务, 并将该请求任务输送至第二级优先级仲裁器; 第二级优先级仲裁器接收到多个请求任务, 并向目的端输出优先级最 高的请求任务的输出结果。
其中,在分别设置第一级轮询仲裁器以及第二级优先级仲裁器之前, 所述方法还包括: 分别预设所述多个源端的优先级。
其中, 将优先级相同的所述请求任务分配至同一所述第一级轮询仲 裁器的步骤还包括:
来自相同源端的优先级相同的请求任务依次分配至对应的所述第一 级轮询仲裁器。
其中, 若接收到改变所述请求任务的优先级的命令, 则所述将优先 级相同的所述请求任务分配至同一所述第一级轮询仲裁器的步骤还包 括:
若所述请求任务已被对应的所述第一级轮询仲裁器处理或未发送至 对应的所述第一级轮询仲裁器, 则改变所述请求任务的优先级, 并将所 若所述请求任务已发送至对应的所述第一级轮询仲裁器且未被处 理, 则不改变所述请求任务的优先级; 或者
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在空闲状 态, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后的优 先级分配至对应的所述第一级轮询仲裁器;
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在忙状 态, 则不改变所述请求任务的优先级。
其中, 在所述第二级优先级仲裁器向目的端输出优先级最高的请求 任务之后, 所述方法还包括:
所述第二级优先级仲裁器向对应的所述第一级轮询仲裁器返回输出 结果;
对应的所述第一级轮询仲裁器向所述第二级优先级仲裁器轮询输送 一个请求任务。
根据本实施例的优先级仲裁装置包括: 请求映射优先级与保持单元、 多个第一级轮询仲裁器和第二级优先级仲裁器; 其中,
请求映射优先级与保持单元, 用于接收来自多个源端请求任务的任务 请求信号, 并将优先级相同的请求任务分配至同一第一级轮询仲裁器; 其 中, 第一级轮询仲裁器的数量与多个源端包括的优先级的数量相同;
多个第一级轮询仲裁器, 其中每个第一级轮询仲裁器用于分别将接收 到的多个优先级相同的请求任务轮询处理得到一个请求任务, 并将该请求 任务输送至第二级优先级仲裁器;
第二级优先级仲裁器, 用于接收来自多个第一级轮询仲裁器的多个请 求任务, 并向目的端输出优先级最高的请求任务的输出结果。
所述装置还包括:
设置单元, 用于分别设置所述多个源端的优先级。
所述装置还包括:
多个优先级请求处理单元, 分别与所述请求映射优先级与保持单元 和多个第一级轮询仲裁器相连接, 用于将来自相同源端的优先级相同的 请求任务依次分配至对应的所述第一级轮询仲裁器。
所述装置还包括:
多个配置优先级命令生效单元, 分别与所述设置单元、 所述请求映 射优先级与保持单元、 所述多个优先级请求处理单元相连接, 用于接收 到所述设置单元改变所述请求任务的优先级的命令, 若所述请求任务已 被对应的所述第一级轮询仲裁器处理或未发送至对应的所述第一级轮询 仲裁器, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后 的优先级分配至对应的所述第一级轮询仲裁器; 若所述请求任务已发送 至对应的所述第一级轮询仲裁器且未被处理, 则不改变所述请求任务的 优先级; 或者
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在空闲状 态, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后的优 先级分配至对应的所述第一级轮询仲裁器; 若所述请求任务之前的优先级对应的第一级轮询仲裁器处在忙状 态, 则不改变所述请求任务的优先级。
其中, 所述第二级优先级仲裁器还用于向目的端输出优先级最高的 请求任务之后, 向对应的所述第一级轮询仲裁器返回输出结果; 对应的 所述第一级轮询仲裁器还用于向所述第二级优先级仲裁器轮询输送一个 请求任务。
与现有技术相比, 根据本发明上述技术方案, 本发明融合了固定优先 级和轮询方式两种仲裁机制, 利用分级仲裁处理结构, 能够实现效率优先, 且可移植性高, 使得动态优先级仲裁所用时间与处理方式不随源端数量的 增加而增加, 克服了一般优先级仲裁实现方式中效率不足的缺点。 进一步 地, 本发明还融合了动态优先级仲裁机制, 可以根据实际需要灵活配置源 端的优先级, 实现动态优先级仲裁机制并兼顾了公平性。 附图说明
此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一 部分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发 明的不当限定。 在附图中:
图 1为现有的仲裁机制典型的应用场景示意图;
图 2为现有的固定优先级仲裁原理图;
图 3为现有的循环优先级仲裁原理图;
图 4为现有的轮询仲裁原理图;
图 5为才艮据本发明实施例的优先级仲裁方法的流程图;
图 6为根据本发明实施例的优先级仲裁装置的框图;
图 7为根据本发明实施例的动态优先级的仲裁装置的优选结构的框图; 图 8为根据本发明实施例的命令生效单元工作处理的流程图; 图 9为根据本发明实施例的请求映射优先级与保持单元工作处理的流 程图;
图 10为根据本发明实施例的优先级请求处理单元工作处理的流程图; 图 11为根据本发明实施例的第一级仲裁单元工作处理的流程图; 图 12为根据本发明实施例的第二级仲裁单元工作处理的流程图。 具体实施方式
本发明提出一种包括轮询方式和固定优先级的分级仲裁处理结构, 能 够实现效率优先, 且可移植性高, 使得优先级仲裁所用时间与处理方式不 随源端数量的增加而增加。 进一步地, 本发明可以根据实际需要灵活配置 源端的优先级, 实现动态优先级仲裁机制的技术方案。 本发明可以同时融 合固定优先级、 轮询方式和动态优先级三种仲裁机制, 通过配置优先级, 实现效率优先, 并兼顾了公平性, 使得动态优先级仲裁所用时间与处理方 式不随源端数量的增加而增加, 克服了一般优先级仲裁实现方式中效率不 足的缺点。
为使本发明的目的、 技术方案和优点更加清楚, 以下结合附图及具体 实施例, 对本发明作进一步地详细说明。
根据本发明的实施例, 提供了一种优先级仲裁方法。
图 5是才艮据本发明实施例的优先级仲裁方法的流程图, 如图 5所示, 该方法包括:
步骤 502,分别设置第一级轮询仲裁器以及第二级优先级仲裁器,其中, 第一级轮询仲裁器的数量与多个源端包括的优先级的数量相同;
步骤 504,接收来自多个源端请求任务的任务请求信号, 并将优先级相 同的请求任务分配至同一第一级轮询仲裁器;
步骤 506,每个第一级轮询仲裁器分别将接收到的多个优先级相同的请 求任务轮询处理得到一个请求任务, 并将该请求任务输送至第二级优先级 仲裁器; 步骤 508, 第二级优先级仲裁器接收到多个请求任务, 并向目的端输出 优先级最高的请求任务的输出结果。
上述技术方案融合了固定优先级和轮询方式两级仲裁处理结构, 能够 分组且分级处理, 在请求任务大的情况下, 与现有单一的仲裁机制相比, 提高了处理效率。
并且, 在源端数量增加, 优先级个数不变的情况下, 不会影响仲裁器 的数量以及仲裁处理流程; 在源端数量不变, 优先级个数增加的情况下, 只需简单 "复制" 一个轮询仲裁器, 仲裁处理流程仍然没有变化; 综上, 本发明技术方案的可移植性高。
优选地, 在每一轮仲裁处理开始前, 可以根据实际需要灵活配置源端 的优先级, 这样也可以兼顾到公平性。
下面详细描述上述各处理的细节。
一、 确定待仲裁的源数量, 和优先级个数。
1. 根据目的端的读写并发能力, 确定待仲裁源的数量。 例如: 目的端 读写数据可同时操作, 则将源端的读数据请求和写数据请求分别仲裁, 此 时每个仲裁机制只统计一种请求操作的源端数量。
2. 将每个待仲裁的源排序, 使得每个源都能获得唯一的序号。 此序号 的顺序也是仲裁机制在轮询仲裁处理时的输出请求顺序。
3.根据源端的数量以及请求源的重要性,确定待仲裁源的优先级个数。 二、 确定每个源请求优先级的生效时间。
根据源端的请求是否完成来确定是否要更新源请求的优先级。 若某一 源请求在之前没有发生请求给仲裁器, 或发送的请求已被响应, 则取该源 请求外部配置的优先级(不论优先级有没有变化) ; 否则保持该源端的优 先级。 或者还可以根据第一级仲裁器是否 "忙" 来判断优先级生效时间, 如源 0之前对应的优先级为 0, 而现在外部要设置其优先级为 1 , 则判断当 前优先级 0映射的第一级仲裁器是否 "忙" , 若是, 则源 0的优先级保持 为 0; 若不是, 则更新源 0的优先级为 1。
三、 设置两级仲裁器, 第一级仲裁釆用轮询处理, 第二级仲裁釆用优 先级处理。
1. 设计轮询优先级仲裁器。 如, 若有源 0同时请求 3个任务要求处理, 若有源 1请求任务个数为 2, 若有源 2请求任务个数为 3 , 且源 0,1,2的优 先级相同, 则仲裁响应输出的顺序为 0,1,2; 0,1,2; 0,2。
2. 设计优先级仲裁器。 如, 若有源 0请求任务个数为 3 , 对应的优先 级为 0, 最高; 若有源 1请求任务个数为 2, 对应的优先级为 1 , 其次; 若 有源 2请求任务个数为 3, 对应的优先级为 0, 最低; 则仲裁响应输出的顺 序为 0,0,0; 1,1 ; 2,2,2。
四、 根据配置的优先级个数, 设置第一级仲裁器数量(每个优先级映 射一个第一级仲裁器) ; 根据第一步判断出的仲裁优先级数量, 设置第一 级仲裁的数量。 即每个优先级映射一个轮询处理的仲裁器。
五、 根据第二步中的生效时间, 将同一优先级请求的任务分配给对应 的第一级仲裁处理, 具体包括:
1. 根据第二步源端请求优先级的生效时间和第四步轮询仲裁器对应的 优先级, 建立源端与轮询仲裁器的一一映射关系。
2. 判断源是否有任务请求, 若有请求则将每个源的一个请求发送给对 应的轮询仲裁器, 同时收集每个轮询仲裁器源端请求的数量(每个源不论 多少个请求, 一次只响应一个请求) , 送给轮询仲裁器仲裁。
六、 每个第一级仲裁器按照轮询的方式输出一个仲裁结果到第二级仲 裁中。 在第一级仲裁器, 将第五步统计的源请求个数, 通过第三步轮询处 理方式输出仲裁结果。
七、 第二级仲裁在接收到第一级仲裁请求任务之后, 按照任务的优先 级输出最高的优先级任务。 在第二级仲裁器 (完全优先级仲裁器) , 将第 六步第一级仲裁器输出的仲裁结果按照第三步完全优先级处理方式输出仲 裁结果。
八、 第七步输出的结果反馈到第一级仲裁器, 指示该任务已被第二级 仲裁器响应, 之后轮询输出另一个同样优先级任务的请求, 具体包括:
1. 将第七步输出的仲裁结果按照其对应 bit位反馈给对应的第一级仲 裁器, 例如: 源 0对应的 bit位为第 0位, 源 1对应的 bit位为第 1位, 源 2 对应的 bit位为第 2位;
2.反馈到第一级仲裁器的输出响应结果,送入到对应的第一级仲裁器。 同时清除对应的源请求任务, 并将总的源请求个数减一 (或 bit清零 ) 。
九、 若某个优先级的第一级仲裁任务都处理完, 则回到第二步; 否则 回到第六步继续仲裁。 例如: 判断第八步输出结果是否为零, 若为 0, 表示 该轮询优先级仲裁处理已经处理完第四步收集的源请求个数, 回到第二步 等待新的源请求。 若不为 0, 表示没有响应完任务请求, 回到第六步继续仲 裁。
经过上述处理, 同时融合固定优先级、 轮询方式和动态优先级三种仲 裁机制, 通过配置优先级, 实现效率优先, 并兼顾了公平性。
根据本发明的实施例, 还提供了一种优先级仲裁装置。
图 6是根据本发明实施例的优先级仲裁装置的框图, 如图 6所示, 该 装置包括:
请求映射优先级与保持单元 10, 用于接收来自多个源端请求任务的任 务请求信号, 并将优先级相同的请求任务分配至同一第一级轮询仲裁器; 其中, 第一级轮询仲裁器的数量与多个源端包括的优先级的数量相同; 多 个第一级轮询仲裁器 20, 其中每个第一级轮询仲裁器用于分别将接收到的 多个优先级相同的请求任务轮询处理得到一个请求任务, 并将该请求任务 输送至第二级优先级仲裁器; 第二级优先级仲裁器 30, 用于接收来自多个 第一级轮询仲裁器的多个请求任务, 并向目的端输出优先级最高的请求任 务的输出结果。
优选地, 本发明实施例应用于多个源端对应一个目的端, 本发明实施 例所实现的仲裁机制是使得多个源端动态可配的优先级获取目的端的数 据。
下面结合图 7至图 12描述本发明实施例。 根据本发明, 首先确定待仲 裁的源端数量, 为每个待仲裁的源端排序。 图 7 为根据本发明实施例的动 态优先级的仲裁装置的优选结构的框图。 在图 7中, 4叚设 3个源端向目的 端请求数据。 如图 7所示, 在图 6所示的基础上, 该装置还包括: 多个配 置优先级命令生效单元(即命令生效单元) , 多个优先级请求处理单元, 以及设置单元(图中未示) , 用于分别设置多个源端的优先级。 参考图 7 , 三个配置优先级命令生效单元(即命令生效单元), 分别与源 0、 源 1和源 2对应,每个配置优先级命令生效单元并行独立工作,以便判断外部配置(或 更改)各个源的优先级是否生效。
图 8是根据本发明实施例的命令生效单元工作处理的流程图。 以源 0 为例, 外部要求更改源 0任务优先级请求时, 输出源 0对应的新优先级命 令, 即要求源 0更新其任务优先级请求; 当收到源 0更改优先级命令后, 判断源 0之前对应的优先级映射的第一级仲裁器是否是在空闲状态, 若是 在空闲状态, 则生效源 0新的优先级命令, 否则等待源 0之前对应的优先 级映射的第一级仲裁器进入空闲状态。
图 9是根据本发明实施例的请求映射优先级与保持单元工作处理的流 程图。 承上述例子, 源 0, 源 1 , 源 2都会根据外部命令配置的优先级, 来 将其任务请求映射到其对应优先级的第一级仲裁器里。 假定源 0 的优先级 通过外部命令配置由 0优先级配置为 1优先级, 则当配置命令生效后, 源 0 的任务请求由原来请求第一级仲裁器 0处理其任务请求, 变为请求第一级 仲裁器 1来处理其任务请求。 这里, 第一级仲裁器 0, 专门用于处理优先级 为 0的任务请求; 第一级仲裁器 1 , 专门用于处理优先级为 1的任务请求。
图 10是根据本发明实施例的优先级请求处理单元工作处理的流程图。 优先级请求处理单元收集各个源请求任务到第一级仲裁器里的数量。 如仲 裁优先级为 0 的第一级仲裁器, 当该仲裁器还在仲裁处理输出请求时, 或 已仲裁输出结果, 但是第二级仲裁没有响应第一级仲裁时, 该优先级请求 处理单元会继续收集对应这个优先级的各个任务请求; 否则将收集到的任 务请求送到对应的第一级仲裁器, 同时再重新收集任务请求。 这里对应的 每个优先级收集任务请求的方法都是一样的。
图 11是根据本发明实施例的第一级仲裁单元(即轮询仲裁器)工作处 理的流程图。 仲裁器在判断有外部任务请求后, 进入收集任务请求状态, 收集到任务后, 进入仲裁处理, 该仲裁处理釆用轮询方式, 即每个任务请 求的优先级是相同的。 这里以优先级为 0映射的第一级仲裁器为例, 4叚设 源 0, 源 1 , 源 2的优先级相同且都为 0, 同时源 0, 源 1 , 源 2都有任务请 求, 则仲裁器只判断这些源有任务请求, 但不会判断每个源有多少个任务 请求, 即每个源一次只能发送一个任务请求给对应优先级的第一级仲裁器。 第一级仲裁器釆用轮询方式输出仲裁结果给第二级仲裁器, 假设第一级仲 裁输出结果为源 0的请求, 则源 0被送入第二级仲裁器, 等待第二级仲裁 器响应, 若第二级仲裁器没有响应这个请求, 则第一级仲裁器一直输出这 个任务请求, 直到第二级仲裁器响应为止; 若第二级仲裁器响应了这个请 求后, 则反馈这个响应给第一级仲裁器, 告诉第一级仲裁器源 0 的请求已 经被响应, 则第一级会去掉源 0的请求, 同时仲裁出源 1的请求给第二级 仲裁器响应。 如此, 直到第二级仲裁器响应了源 2 的请求后, 反馈给第一 级仲裁器, 此时第一级仲裁器判断该次任务的所有请求都已经处理, 则仲 裁器跳到空闲状态继续等待下次任务请求。
图 12是根据本发明实施例的第二级仲裁单元(即优先级仲裁器)工作 处理的流程图。 第二级仲裁器在空闲状态接收来自第一级仲裁器的输出请 求, 当有第一级仲裁器输出的请求后, 第二级仲裁器进入仲裁处理状态, 在所有的第一级仲裁请求里, 输出优先级最高的那个第一级仲裁器的请求。 然后第二级仲裁器再回到空闲状态, 接着处理下一个请求, 此时可以接收 响应的第一级仲裁器的另一个任务请求。 第二级仲裁器输出请求后, 向对 应的第一级仲裁器反馈输出结果。
综上所示, 根据本发明上述技术方案, 集合了固定优先级、 轮询方式 和动态优先级三种仲裁机制, 使得动态优先级仲裁所用时间与处理方式不 随源端数量的增加而增加, 既实现了公平性也兼顾效率优先。
以上所述仅为本发明的实施例而已, 并不用于限制本发明, 对于本领 域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的权 利要求范围之内。

Claims

权利要求书
1、 一种优先级仲裁方法, 其特征在于, 包括:
分别设置第一级轮询仲裁器以及第二级优先级仲裁器, 其中, 所述 第一级轮询仲裁器的数量与多个源端包括的优先级的数量相同;
接收来自所述多个源端请求任务的任务请求信号, 并将优先级相同 的所述请求任务分配至同一所述第一级轮询仲裁器;
每个所述第一级轮询仲裁器分别将接收到的多个优先级相同的所述 请求任务轮询处理得到一个请求任务, 并将该请求任务输送至所述第二 级优先级仲裁器;
所述第二级优先级仲裁器接收到多个所述请求任务, 并向目的端输 出优先级最高的请求任务的输出结果。
2、 根据权利要求 1所述的方法, 其特征在于, 在分别设置第一级轮 询仲裁器以及第二级优先级仲裁器之前, 所述方法还包括:
分别预设所述多个源端的优先级。
3、 根据权利要求 2所述的方法, 其特征在于, 将优先级相同的所述 请求任务分配至同一所述第一级轮询仲裁器的步骤还进一步包括:
来自相同源端的优先级相同的请求任务依次分配至对应的所述第一 级轮询仲裁器。
4、 根据权利要求 3所述的方法, 其特征在于, 若接收到改变所述请 求任务的优先级的命令, 则所述将优先级相同的所述请求任务分配至同 一所述第一级轮询仲裁器的步骤还包括:
若所述请求任务已被对应的所述第一级轮询仲裁器处理或未发送至 对应的所述第一级轮询仲裁器, 则改变所述请求任务的优先级, 并将所 若所述请求任务已发送至对应的所述第一级轮询仲裁器且未被处 理, 则不改变所述请求任务的优先级; 或者
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在空闲状 态, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后的优 先级分配至对应的所述第一级轮询仲裁器;
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在忙状 态, 则不改变所述请求任务的优先级。
5、 根据权利要求 1所述的方法, 其特征在于, 在所述第二级优先级 仲裁器向目的端输出优先级最高的请求任务之后, 所述方法还包括: 所述第二级优先级仲裁器向对应的所述第一级轮询仲裁器返回输出 结果;
对应的所述第一级轮询仲裁器向所述第二级优先级仲裁器轮询输送 一个请求任务。
6、 一种优先级仲裁装置, 其特征在于, 包括: 请求映射优先级与保 持单元、 多个第一级轮询仲裁器和第二级优先级仲裁器; 其中,
请求映射优先级与保持单元, 用于接收来自多个源端请求任务的任 务请求信号, 并将优先级相同的所述请求任务分配至同一第一级轮询仲 裁器; 其中, 所述第一级轮询仲裁器的数量与多个源端包括的优先级的 数量相同;
多个第一级轮询仲裁器, 其中每个所述第一级轮询仲裁器用于分别 将接收到的多个优先级相同的所述请求任务轮询处理得到一个请求任 务, 并将该请求任务输送至所述第二级优先级仲裁器;
第二级优先级仲裁器, 用于接收来自多个所述第一级轮询仲裁器的 多个所述请求任务,并向目的端输出优先级最高的请求任务的输出结果。
7、 根据权利要求 6所述的装置, 其特征在于, 还包括:
设置单元, 用于分别设置所述多个源端的优先级。
8、 根据权利要求 7所述的装置, 其特征在于, 还包括: 多个优先级请求处理单元, 分别与所述请求映射优先级与保持单元 和多个第一级轮询仲裁器相连接, 用于将来自相同源端的优先级相同的 请求任务依次分配至对应的所述第一级轮询仲裁器。
9、 根据权利要求 8所述的装置, 其特征在于, 还包括:
多个配置优先级命令生效单元, 分别与所述设置单元、 所述请求映 射优先级与保持单元、 所述多个优先级请求处理单元相连接, 用于接收 到所述设置单元改变所述请求任务的优先级的命令, 若所述请求任务已 被对应的所述第一级轮询仲裁器处理或未发送至对应的所述第一级轮询 仲裁器, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后 的优先级分配至对应的所述第一级轮询仲裁器; 若所述请求任务已发送 至对应的所述第一级轮询仲裁器且未被处理, 则不改变所述请求任务的 优先级; 或者
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在空闲状 态, 则改变所述请求任务的优先级, 并将所述请求任务按照改变后的优 先级分配至对应的所述第一级轮询仲裁器;
若所述请求任务之前的优先级对应的第一级轮询仲裁器处在忙状 态, 则不改变所述请求任务的优先级。
10、 根据权利要求 6所述的装置, 其特征在于, 所述第二级优先级 仲裁器还用于向目的端输出优先级最高的请求任务之后, 向对应的所述 第一级轮询仲裁器返回输出结果; 对应的所述第一级轮询仲裁器还用于 向所述第二级优先级仲裁器轮询输送一个请求任务。
PCT/CN2011/075011 2010-06-28 2011-05-31 一种优先级仲裁方法及装置 WO2012000365A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US13/522,542 US9372715B2 (en) 2010-06-28 2011-05-31 Priority level arbitration method and device
EP11800110.6A EP2515232B1 (en) 2010-06-28 2011-05-31 Priority level arbitration method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010212235.9 2010-06-28
CN201010212235.9A CN101887382B (zh) 2010-06-28 2010-06-28 动态优先级的仲裁方法及装置

Publications (1)

Publication Number Publication Date
WO2012000365A1 true WO2012000365A1 (zh) 2012-01-05

Family

ID=43073310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/075011 WO2012000365A1 (zh) 2010-06-28 2011-05-31 一种优先级仲裁方法及装置

Country Status (4)

Country Link
US (1) US9372715B2 (zh)
EP (1) EP2515232B1 (zh)
CN (1) CN101887382B (zh)
WO (1) WO2012000365A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776031A (zh) * 2016-12-21 2017-05-31 浙江大华技术股份有限公司 一种数据发送方法及装置
CN115037802A (zh) * 2022-06-02 2022-09-09 北京百度网讯科技有限公司 一种请求处理方法、装置、电子设备和存储介质

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887382B (zh) 2010-06-28 2016-11-23 南京中兴软件有限责任公司 动态优先级的仲裁方法及装置
DE102011083468A1 (de) * 2011-09-27 2013-03-28 Robert Bosch Gmbh Schaltungsanordnung zur Ablaufplanung bei einer Datenverarbeitung
CN103885376A (zh) 2012-12-19 2014-06-25 施耐德电器工业公司 可编程逻辑控制器及其事件驱动编程方法
US9372818B2 (en) * 2013-03-15 2016-06-21 Atmel Corporation Proactive quality of service in multi-matrix system bus
US10366330B2 (en) * 2013-05-03 2019-07-30 Synopsys, Inc. Formal verification result prediction
US9372716B1 (en) * 2013-09-23 2016-06-21 Amazon Technologies, Inc. Download prioritization
WO2015100614A1 (en) 2013-12-31 2015-07-09 Thomson Licensing User-centered task scheduling for multi-screen viewing in cloud computing environment
CN104994026A (zh) * 2015-05-27 2015-10-21 复旦大学无锡研究院 一种应用于片上网络支持硬实时通信的路由开关
WO2018103565A1 (en) * 2016-12-09 2018-06-14 Zhejiang Dahua Technology Co., Ltd. Methods and systems for data transmission
CN107315703B (zh) * 2017-05-17 2020-08-25 天津大学 双优先级控制型公平仲裁器
CN107835134B (zh) * 2017-10-20 2021-02-02 深圳市风云实业有限公司 应用于以太网交换芯片的端口访问仲裁方法及装置
KR102327878B1 (ko) 2017-11-07 2021-11-17 삼성전자주식회사 반도체 장치 및 반도체 시스템
CN109062661B (zh) * 2018-07-10 2021-10-26 中国电子科技集团公司第三十八研究所 一种在线仿真调试器的多通道仲裁电路及其调度方法
CN109597777A (zh) * 2018-12-11 2019-04-09 济南浪潮高新科技投资发展有限公司 一种基于fpga的mcbsp接口互联装置及方法
US10838892B1 (en) * 2019-07-29 2020-11-17 Xilinx, Inc. Multistage round robin arbitration
CN111752876B (zh) * 2020-05-26 2023-03-14 苏州浪潮智能科技有限公司 一种用于接口优先级仲裁的系统
CN113114404B (zh) * 2021-04-01 2023-06-02 四川创智联恒科技有限公司 一种通用eCPRI接口拓展装置及方法
CN114996178A (zh) * 2022-06-30 2022-09-02 山东云海国创云计算装备产业创新中心有限公司 一种总线仲裁的方法、系统、设备和存储介质
CN114925004B (zh) * 2022-07-19 2022-10-21 中科声龙科技发展(北京)有限公司 轮询仲裁器及其轮询仲裁方法和芯片
CN115080474B (zh) * 2022-07-19 2022-12-02 中科声龙科技发展(北京)有限公司 加权轮询仲裁器及其轮询仲裁方法和芯片
CN114968866B (zh) * 2022-08-01 2022-11-01 中科声龙科技发展(北京)有限公司 优先级分组轮询仲裁器及其仲裁方法、交叉开关和芯片
CN115686864B (zh) * 2022-11-17 2023-09-15 沐曦集成电路(南京)有限公司 一种仲裁系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4314335A (en) * 1980-02-06 1982-02-02 The Perkin-Elmer Corporation Multilevel priority arbiter
CN1581125A (zh) * 2003-08-01 2005-02-16 上海奇码数字信息有限公司 仲裁器和仲裁方法
CN1912857A (zh) * 2005-08-08 2007-02-14 乐金电子(昆山)电脑有限公司 存储器仲裁方法及数据处理系统
CN101887382A (zh) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 动态优先级的仲裁方法及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4450321A (en) * 1981-12-08 1984-05-22 Quigley William D Circuit for producing noise generation for sound masking
US6658447B2 (en) * 1997-07-08 2003-12-02 Intel Corporation Priority based simultaneous multi-threading
US5958036A (en) * 1997-09-08 1999-09-28 Lucent Technologies Inc. Circuit for arbitrating interrupts with programmable priority levels
CN1349362A (zh) * 2000-10-17 2002-05-15 华为技术有限公司 一种gsm宽带基站中的多载波任务处理方法
CN1177451C (zh) * 2002-02-27 2004-11-24 华为技术有限公司 通信系统中多优先级缓冲传输方法
CN1230737C (zh) * 2002-09-23 2005-12-07 华为技术有限公司 一种设备数据轮询调度方法
US20080059674A1 (en) 2006-09-01 2008-03-06 Jiaxiang Shi Apparatus and method for chained arbitration of a plurality of inputs
US7773621B2 (en) * 2006-09-16 2010-08-10 Mips Technologies, Inc. Transaction selector employing round-robin apparatus supporting dynamic priorities in multi-port switch
CN101290668B (zh) * 2008-06-16 2011-08-17 中国移动通信集团湖北有限公司 一种分时作业动态调度方法和装置
US8032678B2 (en) 2008-11-05 2011-10-04 Mediatek Inc. Shared resource arbitration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4314335A (en) * 1980-02-06 1982-02-02 The Perkin-Elmer Corporation Multilevel priority arbiter
CN1581125A (zh) * 2003-08-01 2005-02-16 上海奇码数字信息有限公司 仲裁器和仲裁方法
CN1912857A (zh) * 2005-08-08 2007-02-14 乐金电子(昆山)电脑有限公司 存储器仲裁方法及数据处理系统
CN101887382A (zh) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 动态优先级的仲裁方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2515232A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776031A (zh) * 2016-12-21 2017-05-31 浙江大华技术股份有限公司 一种数据发送方法及装置
CN106776031B (zh) * 2016-12-21 2019-11-15 浙江大华技术股份有限公司 一种数据发送方法及装置
CN115037802A (zh) * 2022-06-02 2022-09-09 北京百度网讯科技有限公司 一种请求处理方法、装置、电子设备和存储介质
CN115037802B (zh) * 2022-06-02 2024-03-08 北京百度网讯科技有限公司 一种请求处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
US20130091505A1 (en) 2013-04-11
EP2515232B1 (en) 2019-05-08
EP2515232A4 (en) 2016-01-06
EP2515232A1 (en) 2012-10-24
US9372715B2 (en) 2016-06-21
CN101887382B (zh) 2016-11-23
CN101887382A (zh) 2010-11-17

Similar Documents

Publication Publication Date Title
WO2012000365A1 (zh) 一种优先级仲裁方法及装置
US7349424B2 (en) On-chip inter-subsystem communication including concurrent data traffic routing
US9183167B2 (en) Enhanced I/O performance in a multi-processor system via interrupt affinity schemes
CN102231142B (zh) 一种带有仲裁器的多通道dma控制器
US7275119B2 (en) Early detection and grant, an arbitration scheme for single transfers on AMBA advanced high-performance bus
CN113468084B (zh) 一种多模式dma数据传输系统
US20120042105A1 (en) Bus arbitration apparatus
JP2009508247A (ja) バス調停に関する方法及びシステム
CN1552028A (zh) 用于片上系统的分布式直接存储器访问的方法和装置
JP2007079789A (ja) 計算機システム及びイベント処理方法
WO2014048349A1 (zh) 一种传输数据的方法和设备
CN101038574A (zh) 总线仲裁装置
CN100351824C (zh) 总线系统和用于连接到总线的总线接口
US9367511B2 (en) System method for managing USB data transfers by sorting a plurality of endpoints in scheduling queue in descending order based partially on endpoint frequency
US9330038B2 (en) Computer arbitration system, bandwidth, allocation apparatus, and method thereof
CN101169766A (zh) 动态建立直接内存访问通路的方法及系统
WO2013177854A1 (zh) 一种多核处理器的核间通信装置及方法
JP2007122410A (ja) バス調停回路及びバス調停方法
CN103218326A (zh) 综合仲裁器装置
US6889283B2 (en) Method and system to promote arbitration priority in a buffer queue
WO2022199357A1 (zh) 数据处理方法及装置、电子设备、计算机可读存储介质
CN109101443B (zh) 一种权重分时的仲裁装置及方法
TWI282057B (en) System bus controller and the method thereof
CN108259382A (zh) 3×256优先级调度电路
JP2008042730A (ja) 車載用ネットワークシステム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11800110

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011800110

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 13522542

Country of ref document: US

Ref document number: 6286/CHENP/2012

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE