WO2018049821A1 - 请求源响应的仲裁方法、装置及计算机存储介质 - Google Patents

请求源响应的仲裁方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2018049821A1
WO2018049821A1 PCT/CN2017/082634 CN2017082634W WO2018049821A1 WO 2018049821 A1 WO2018049821 A1 WO 2018049821A1 CN 2017082634 W CN2017082634 W CN 2017082634W WO 2018049821 A1 WO2018049821 A1 WO 2018049821A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
response
response function
request source
equal
Prior art date
Application number
PCT/CN2017/082634
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 深圳市中兴微电子技术有限公司
Publication of WO2018049821A1 publication Critical patent/WO2018049821A1/zh

Links

Images

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/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • G06F13/30Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal with priority control

Definitions

  • the present invention relates to the field of communication and system-on-a-chip (SoC) chip design, and more particularly to an arbitration method, device and computer storage medium for requesting source response.
  • SoC system-on-a-chip
  • Each request source on the SoC chip can independently access the memory.
  • the memory only allows one request source at the same time. Read and write access to it, in this case, it is necessary to use a certain arbitration method to arbitrate these request sources, balance the response of each request source and take into account the request with priority access rights;
  • the arbitration method mainly includes: through polling The method responds, accesses according to the priority order of the specified request sources, and responds according to the order in which the request source sends the request.
  • the request frequency of each request source is ignored, and the response wait time is longer. The response distribution is not balanced, which greatly wastes the bus resources.
  • embodiments of the present invention are directed to providing an arbitration method, apparatus, and computer storage medium for requesting source response, so as to implement real-time, dynamic, balanced, and efficient scheduling management of response to each request source, and fully utilize bus resources.
  • An embodiment of the present invention provides an arbitration method for requesting a source response, where the method includes:
  • FIFO First In First Out
  • a request source of the first response is determined among all the request sources according to the preset function between the response function value, the response function threshold value, and the priority parameter.
  • the method further includes:
  • the weight parameter of the request source is set according to the number of consecutive accesses of the request source; the weight parameter of the request source is stored in the FIFO.
  • the request parameter threshold value includes: a waiting response period number threshold value, and a request command number threshold value;
  • the request parameter value includes: a waiting response period number, and a request command number;
  • the first response function is a function of waiting for a response period threshold value and a request command number threshold
  • the second response function is a function that waits for the number of response cycles and the number of request commands.
  • the response function value, response function threshold, priority A preset rule between parameters, and one request source that determines the first response among all request sources includes:
  • the request source is determined to be the first response
  • response function value of two or more request sources in all request sources is greater than or equal to the response function threshold, it is determined whether the highest priority parameters are equal among the two or more request sources.
  • the request source with the highest priority parameter is determined as the first response among the two or more request sources;
  • the request source with the earliest request access time is determined as the first response among the request sources with the highest priority parameters
  • the request source with the highest response function value is determined as the first response among all the request sources;
  • the request source with the highest priority parameter is determined as the first response among the request sources whose response function values are equal;
  • the request source with the earliest request access time is determined as the first response among the request sources whose response function values are equal.
  • the requesting parameter value of the request source is obtained in the FIFO, including:
  • the request source starts to write a request command to the FIFO
  • the number of waiting response cycles of the request source is counted until the request source is responded.
  • An embodiment of the present invention further provides an arbitration apparatus for requesting a source response, where the apparatus includes:
  • a cache module configured to set a request parameter threshold value and a priority parameter of the request source, and obtain a response function threshold according to the request parameter threshold value and the first response function;
  • the cache module is further configured to obtain a request parameter value of the request source in the FIFO, and obtain a response function value according to the request parameter value and the second response function;
  • the arbitration module is configured to determine, according to the response rule value, the response function threshold, and a preset rule between the priority parameters, a request source that is the first response among all the request sources.
  • the cache module is further configured to:
  • the weight parameter of the request source is set according to the number of consecutive accesses of the request source; the weight parameter of the request source is stored in the FIFO.
  • the request parameter threshold value includes: a waiting response period number threshold value, and a request command number threshold value;
  • the request parameter value includes: a waiting response period number, and a request command number;
  • the first response function is a function of waiting for a response period threshold value and a request command number threshold
  • the second response function is a function that waits for the number of response cycles and the number of request commands.
  • the arbitration module is specifically configured to:
  • the request source is determined to be the first response
  • the response function value is greater than or equal to According to the function threshold, it is judged whether the highest priority parameters are equal among the two or more request sources.
  • the request source with the highest priority parameter is determined as the first response among the two or more request sources;
  • the request source with the earliest request access time is determined as the first response among the request sources with the highest priority parameters
  • the request source with the highest response function value is determined as the first response among all the request sources;
  • the request source with the highest priority parameter is determined as the first response among the request sources whose response function values are equal;
  • the request source with the earliest request access time is determined as the first response among the request sources whose response function values are equal.
  • the cache module is further configured as:
  • the request source starts to write a request command to the FIFO
  • the number of waiting response cycles of the request source is counted until the request source is responded.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the arbitration method of request source response according to the embodiment of the invention.
  • the arbitration method, device, and computer storage medium for request source response provided by the embodiment of the present invention, by setting a request parameter threshold value and a priority parameter of a request source, and according to the request
  • the threshold value and the first response function obtain a response function threshold value; writing a request command sent by the request source to the FIFO; obtaining a request parameter value of the request source in the FIFO, and according to the request
  • the parameter value and the second response function obtain a response function value; according to the preset rule between the response function value, the response function threshold value, and the priority parameter, determining a request source of the first response among all the request sources; It realizes real-time, dynamic, balanced and efficient scheduling management of the response of each request source, making full use of bus resources.
  • FIG. 1 is a schematic flowchart 1 of a method for arbitrating a request source response according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart 2 of a method for arbitrating a request source response according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an arbitration process of request source response according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for arbitrating a request source response according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart 1 of a method for arbitrating a request source response according to an embodiment of the present invention.
  • an arbitration method for requesting a source response according to an embodiment of the present invention may include the following steps:
  • Step 101 Set a request parameter threshold value and a priority parameter of the request source, and obtain a response function threshold according to the request parameter threshold value and the first response function.
  • the request parameter threshold is The value includes a waiting response period threshold value and a request command number threshold value
  • the first response function is a function of a waiting response period number threshold value and a request command number threshold value.
  • the threshold value of the waiting response period of the request source 1 is set to N1 max
  • the threshold of the request command is M1 max
  • priority is P1
  • Step 102 Write a request command sent by the request source into the FIFO.
  • the request source sends a request command and writes the request command to its own first FIFO for saving.
  • Step 103 Obtain a request parameter value of the request source in the FIFO, and obtain a response function value according to the request parameter value and the second response function.
  • the request parameter value of the request source is obtained from the FIFO of the request source, that is, the number of waiting response cycles and the number of request commands in the FIFO of the current request source are obtained, and then the obtained waiting response cycle number is The number of request commands is substituted into the second response function, and the response function value is obtained.
  • the number of waiting response cycles acquired from the FIFO of the request source 1 at a certain time is N1
  • the number of obtained request commands is M1
  • Step 104 Determine, according to the preset rule between the response function value, the response function threshold value, and the priority parameter, a request source that is the first response among all the request sources.
  • the arbiter responds to a request source that determines the first response among all the request sources according to the preset rule between the obtained response function value, the response function threshold value, and the set priority parameter.
  • request source 1 For example, at a certain moment, there are three request sources: request source 1, request source 2, and request source 3.
  • the request is initiated, and the arbiter obtains the response function value of the request source 1, the request source 2, and the request source 3, and the response function gate.
  • the limit value and the set priority parameter respectively determine whether the response function values of the request source 1, the request source 2, and the request source 3 are greater than or equal to the respective response function threshold values, and determine a request for the first response according to the determination result.
  • the response source if only in request source 1, request source 2, and request source 3 If the response function value of the source 1 is greater than or equal to the response function threshold, the response source 1 is responded; if only the response function values of the request source 1 and the request source 2 are greater than or equal to the respective response function thresholds, then the two responses are A request source with a higher priority parameter among the request sources; if the response function values of the three request sources are smaller than the respective response function thresholds, the response source with the highest response function value is responded to.
  • the first response function and the second response function may be set according to actual requirements, and are not limited herein.
  • the method for arbitrating the request source response provided by the embodiment of the present invention, by setting a request parameter threshold value and a priority parameter of the request source, and obtaining a response function threshold according to the request parameter threshold value and the first response function;
  • the request command sent by the request source is written into the FIFO;
  • the request parameter value of the request source is obtained in the FIFO, and the response function value is obtained according to the request parameter value and the second response function; according to the response function
  • the default rule between the value, the response function threshold, and the priority parameter determines a request source that responds first among all the request sources; realizes real-time, dynamic, balanced, and efficient response to each request source. Scheduling management, making full use of bus resources.
  • an arbitration method for requesting a source response may include the following steps:
  • Step 201 Set a request parameter threshold value and a priority parameter of the request source, and obtain a response function threshold value according to the request parameter threshold value and the first response function.
  • the request parameter threshold is The value includes a waiting response period threshold value and a request command number threshold value
  • the first response function is a function of a waiting response period number threshold value and a request command number threshold value.
  • the function threshold is 60
  • the response function threshold of request source 2 is 56.
  • Step 202 Write a request command sent by the request source into the FIFO.
  • Each request source has a FIFO for storing request commands, each request source sends a request command, and writes the request command to its respective FIFO, so that each request source does not have to wait for the previous request command to get a response. Continue to send the next request command.
  • the request source 1 and the request source 2 send a request command.
  • the request source 1 stores the request command in its own FIFO
  • the request source 2 stores the request command in the FIFO of the request source 2, and it is not necessary to request the command to be stored.
  • the next request command can be sent considering whether it is responded.
  • Step 203 Acquire a request parameter value of the request source from the FIFO, and obtain a response function value according to the request parameter value and the second response function.
  • the response function value of request source 1 is 18.
  • Step 204 Determine whether the response function value of each request source is greater than or equal to the response function threshold value in all the request sources.
  • step 210 to step 212 are performed.
  • step 213 If the response function value of only one request source in all the request sources is greater than or equal to the response function threshold, step 213 is performed.
  • Step 205 Determine whether there are equal response function values in all request sources.
  • step 206 When the value of the response function of none of the request sources is greater than or equal to the response function threshold, it is determined whether there is an equal response function value among all the request sources; if there is no equal response function value, then step 206 is executed. Step 214; if there is an equal response function value, step 207 is performed.
  • Step 206 Determine the request source with the highest response function value as the first response among all the request sources.
  • the request source with the highest response function value in all request sources is determined as the most Respond first.
  • Step 207 Determine whether the highest priority parameters are equal in the request source whose response function values are equal.
  • step 208 is performed after step 208 is performed; if the highest priority parameters are equal, step 209 is performed after step 209 is performed.
  • Step 208 Determine, in the request source with the same response function value, the request source with the highest priority parameter as the first response.
  • the request source with the highest priority parameter among the request sources with the same response function value is determined as the first response.
  • Step 209 Determine, in the request source with the same response function value, the request source with the earliest request access time as the first response.
  • the request source with the same response function value is equal, the request source with the earliest request access time is determined as the first response.
  • Step 210 Determine whether the highest priority parameters are equal.
  • step 211 is performed after step 211 is performed; if the highest priority parameters are equal, step 212 is performed after step 212 is performed.
  • Step 211 Determine the request source with the highest priority parameter as the first response.
  • the request source with the highest priority parameter among the one or more request sources is the first response.
  • Step 212 Determine, in the request source with the highest priority parameter equal, the request source with the earliest request access time as the first response.
  • the highest priority determines the request source with the earliest request access time as the first response.
  • Step 213 Determine that the request source whose response function value is greater than or equal to the response function threshold is the first response.
  • This request source is determined to be the first response when the response function value of only one of the request sources is greater than or equal to the response function threshold.
  • Step 214 Set a weight parameter of the request source according to the number of consecutive accesses of the request source.
  • the weight parameter is set according to the number of consecutive accesses of the request source, and is stored in the FIFO; when the request source obtains the first response right, continuous access is performed according to the set weight parameter value. For each access, the weight parameter is decremented by 1 until it is decremented to 0, and the arbitration of the request source is re-initiated. That is, only the request source that obtained the response completes the continuous access, and then all the request sources are re-arbitrated.
  • the request source 1 obtains the first response right, and its weight parameter is 5. After the request source 1 accesses 5 times in succession, the arbitration of all the request sources is initiated again.
  • the first response function and the second response function may be set according to actual requirements, and are not limited herein.
  • FIG. 3 is a schematic diagram of an arbitration process for request source response according to an embodiment of the present invention.
  • request source 1 taking three request sources as an example, request source 1, request source 2, and request source 3 simultaneously initiate a request command, each request.
  • the source sends the request command and saves it in the respective FIFOs.
  • the FIFO depth of the three request sources is 10; the request parameter thresholds, priority parameters, and the first response function and the second response function of the three request sources are respectively set.
  • Table 1 shows that
  • Threshold 20 since at this moment, the response function value of none of the three request sources is greater than or equal to the response function threshold, the request source for responding is determined according to the size of the response function value; The source response function values are different.
  • the response priority order is: request source 1 > request source 2 > request source 3, so respond to request source 1; meanwhile, the number of wait response cycles of request source 1 is cleared to 0 and restarts counting. .
  • the number of request commands for reacquiring three request sources is 5, 6, and 4, respectively, and the number of waiting response cycles N is 8, 9, and 6, respectively, so that three are obtained.
  • the response function values of the request source are 40, 54, and 24, respectively; at this moment, the response function values of request source 1 and request source 2 are still smaller than the respective response function thresholds, and the response function value of request source 3 is greater than Its ringing
  • the function threshold value that is, only the response function value of the request source 3 is larger than the response function threshold among the three request sources, and therefore responds to the request source 3.
  • the response function values of request source 2 and request source 3 are both greater than their respective response function thresholds, and the response function value of request source 1 is less than the response function threshold, ie Among the three request sources, the response function value of the two request sources is greater than or equal to the response function threshold, so the request source of the first response is determined according to the priority parameters of the two request sources; the priority of the request source 2 is The parameter is 1, and the priority parameter of request source 3 is 2, that is, the priority order is: request source 3 > request source 2, and therefore responds to request source 3.
  • the response function values of the request source 1 and the request source 2 are both greater than their respective response function thresholds, and the response function value of the request source 3 is less than the response function threshold value, that is, Among the three request sources, the response function value of the two request sources is greater than or equal to the response function threshold, so the request source of the first response is determined according to the priority parameters of the two request sources, but the source 1 and the request source are requested.
  • the priority parameters of 2 are the same, both are 1, so the response needs to be sequentially performed in the polling manner, that is, the request source 1 has the earliest request access time, so the request source 1 is first responded.
  • AXI Advanced eXtensible Interface
  • the method for arbitrating the request source response provided by the embodiment of the present invention, by setting a request parameter threshold value and a priority parameter of the request source, and obtaining a response function threshold according to the request parameter threshold value and the first response function;
  • the request command sent by the request source is written into the FIFO;
  • the request parameter value of the request source is obtained from the FIFO, and the response function value is obtained according to the request parameter value and the second response function; each request source is separately determined in all request sources Whether the response function value is greater than or equal to Response function threshold; if the response function value of none of the request sources is greater than or equal to the response function threshold, then all the request sources are judged whether there is an equal response function value; if there is no equal response function value , the request source with the highest response function value is determined as the first response among all the request sources; if there is an equal response function value, it is determined whether the highest priority parameter is equal in the request source with the same response function value; If the level parameters are not equal, the request source with the
  • the earliest request source is the first response; if the response function value of two or more request sources in all request sources is greater than or equal to the response function threshold, it is determined whether the highest priority parameter is equal; if the highest priority If the parameters are not equal, the request source with the highest priority parameter is determined as the first response; if the highest priority parameter is equal Then, in the request source with the highest priority parameter, the request source with the earliest request access time is determined as the first response; if only one of the request sources has a response function value greater than or equal to the response function threshold, the response is determined.
  • the request source whose function value is greater than or equal to the response function threshold is the first response; the weight parameter of the request source is set according to the number of consecutive accesses of the request source; realizing the response to each request source in real time, dynamic, balanced, and efficient Scheduling management, making full use of bus resources.
  • the arbitration apparatus 04 for request source response provided by the embodiment of the present invention includes: a cache module 41, a write module 42, and an arbitration Module 43; wherein
  • the cache module 41 is configured to set a request parameter threshold value and a priority parameter of the request source, and obtain a response function threshold according to the request parameter threshold value and the first response function;
  • the request parameter threshold value includes: a waiting response period number threshold value, and a request command number threshold value; the first response function is a function of waiting for the response period number threshold value and the request command number threshold value;
  • the writing module 42 is configured to write a request command sent by the request source into the FIFO;
  • the cache module 41 is further configured to obtain a request parameter value of the request source in the FIFO, and obtain a response function value according to the request parameter value and the second response function;
  • the request parameter value includes: a waiting response period number, a request command number; and the second response function is a function of waiting for the response period number and the request command number;
  • the arbitration module 43 is configured to determine, according to the response rule value, the response function threshold, and a preset rule between the priority parameters, a request source that is the first response among all the request sources.
  • the cache module 41 is further configured to: when the request source needs continuous access, set a weight parameter of the request source according to the number of consecutive accesses of the request source;
  • the weight parameter of the request source is stored in the FIFO.
  • the arbitration module 43 is specifically configured to: determine, in all request sources, whether a response function value of each request source is greater than or equal to a response function threshold,
  • the request source is determined to be the first response
  • response function value of two or more request sources in all request sources is greater than or equal to the response function threshold, it is determined whether the highest priority parameters are equal among the two or more request sources.
  • the request source with the highest priority parameter is determined as the first response among the two or more request sources;
  • the request source with the earliest request access time is determined as the first response among the request sources with the highest priority parameters
  • the request source with the highest response function value is determined as the first response among all the request sources;
  • the request source with the highest priority parameter is determined as the first response among the request sources whose response function values are equal;
  • the request source with the earliest request access time is determined as the first response among the request sources whose response function values are equal.
  • the cache module 41 is further configured to: count the number of request commands of the request source stored in the FIFO; when the request source starts writing a request command to the FIFO, The number of wait response periods of the request source is counted until the request source is responded.
  • the device in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the cache module 41, the write module 42, and the arbitration module 43 may each be a central processing unit (CPU), a microprocessor (Micro Processor Unit, located in the arbitration device 04 that requests the source response. MPU), digital signal processor (DSP) or Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • the embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the arbitration method of the request source response described in the foregoing embodiments.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the technical solution of the embodiment of the present invention sets a request parameter threshold value and a priority parameter of the request source, and obtains a response function threshold according to the request parameter threshold value and the first response function; and sends the request source Requesting a command to be written into the FIFO; obtaining a request parameter value of the request source in the FIFO, and obtaining a response function value according to the request parameter value and the second response function; according to the response function value and the response function threshold
  • Preset rules between values and priority parameters A request source that responds first is determined among all the request sources; thus, real-time, dynamic, balanced, and efficient scheduling management of the response of each request source is realized, and the bus resources are fully utilized.

Abstract

本发明实施例公开了一种请求源响应的仲裁方法,包括:设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;将所述请求源发送的请求命令写入先入先出队列(FIFO)中;在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。本发明实施例同时公开了一种请求源响应的仲裁装置及计算机存储介质。

Description

请求源响应的仲裁方法、装置及计算机存储介质
相关申请的交叉引用
本申请基于申请号为201610832492.X、申请日为2016年09月19日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及通信与片上系统(System-on-a-Chip,SoC)芯片设计领域,尤其涉及一种请求源响应的仲裁方法、装置及计算机存储介质。
背景技术
随着设计与制造技术的发展,集成电路设计从晶体管的集成发展到逻辑门的集成,又发展到了如今的SoC设计技术;采用SoC芯片进行产品开发,能够降低系统板上因信号在多个芯片之间进出带来的延迟而导致的性能局限,能够有效地降低电子及信息产品的开发成本,缩短开发周期,提高系统的可靠性及产品的竞争力。
SoC芯片上的各请求源能够对存储器进行独立的访问,实际中,在同一时刻,很可能会存在多个请求源对同一存储器的访问,而一般情况下,存储器在同一时刻只允许一个请求源对其进行读写访问,这时,就需要采用一定的仲裁方法对这些请求源进行仲裁,均衡分配各请求源的响应且兼顾有优先访问权的请求;目前,仲裁方法主要包括:通过轮询方式进行响应、根据指定的各请求源的优先级顺序进行访问、根据请求源发送请求的先后顺序进行响应;采用这些方法进行仲裁时,忽视了各请求源的请求频率,响应等待的时间较长,响应分配不均衡,极大的浪费了总线资源。
发明内容
有鉴于此,本发明实施例期望提供一种请求源响应的仲裁方法、装置及计算机存储介质,以实现对各请求源的响应进行实时、动态、均衡和高效的调度管理,充分利用总线资源。
为达到上述目的,本发明实施例的技术方案是这样实现的:
本发明实施例提供一种请求源响应的仲裁方法,所述方法包括:
设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;
将所述请求源发送的请求命令写入先入先出队列(FIFO,First In First Out)中;
在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;
根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
在一实施例中,在全部请求源中确定出最先响应的一个请求源之后,所述方法还包括:
在所述请求源需要连续访问时,根据所述请求源的连续访问次数设置所述请求源的权重参数;所述请求源的权重参数存储于所述FIFO中。
在一实施例中,所述请求参数门限值:包括等待响应周期数门限值、请求命令数门限值;
所述请求参数值:包括等待响应周期数、请求命令数;
所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数;
所述第二响应函数为等待响应周期数与请求命令数的函数。
在一实施例中,所述根据所述响应函数值、响应函数门限值、优先级 参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源包括:
在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值,
若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一个请求源确定为最先响应;
若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则在这两个或两个以上请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这两个或两个以上请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;
若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值,
若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;
若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
在一实施例中,所述在所述FIFO中得到所述请求源的请求参数值,包括:
统计在所述FIFO中存储的所述请求源的请求命令数;
所述请求源向所述FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到所述请求源得到响应为止。
本发明实施例还提供一种请求源响应的仲裁装置,所述装置包括:
缓存模块,配置为设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;
写入模块,配置为将所述请求源发送的请求命令写入FIFO中;
所述缓存模块,还配置为在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;
仲裁模块,配置为根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
在一实施例中,所述缓存模块还配置为:
在所述请求源需要连续访问时,根据所述请求源的连续访问次数设置所述请求源的权重参数;所述请求源的权重参数存储于所述FIFO中。
在一实施例中,所述请求参数门限值:包括等待响应周期数门限值、请求命令数门限值;
所述请求参数值:包括等待响应周期数、请求命令数;
所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数;
所述第二响应函数为等待响应周期数与请求命令数的函数。
在一实施例中,所述仲裁模块,具体配置为:
在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值,
若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一个请求源确定为最先响应;
若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响 应函数门限值,则在这两个或两个以上请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这两个或两个以上请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;
若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值,
若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;
若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
在一实施例中,所述缓存模块,还具体配置为:
统计在所述FIFO中存储的所述请求源的请求命令数;
所述请求源向所述FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到所述请求源得到响应为止。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述的请求源响应的仲裁方法。
本发明实施例所提供的请求源响应的仲裁方法、装置及计算机存储介质,通过设置请求源的请求参数门限值、优先级参数,并根据所述请求参 数门限值与第一响应函数得到响应函数门限值;将所述请求源发送的请求命令写入FIFO中;在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源;实现了对各请求源的响应进行实时、动态、均衡和高效的调度管理,充分利用了总线资源。
附图说明
图1为本发明实施例提供的请求源响应的仲裁方法的流程示意图一;
图2为本发明实施例提供的请求源响应的仲裁方法的流程示意图二;
图3为本发明实施例提供的请求源响应的仲裁过程示意图;
图4为本发明实施例提供的请求源响应的仲裁装置的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
实施例一
图1为本发明实施例提供的请求源响应的仲裁方法的流程示意图一,如图1所示,本发明实施例提供的一种请求源响应的仲裁方法可以包括如下步骤:
步骤101:设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值。
首先,为每一个请求源设置请求参数门限值和优先级参数,并将设置的请求参数门限值代入第一响应函数中,计算得到响应函数门限值;其中,所述请求参数门限值包括等待响应周期数门限值和请求命令数门限值;所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数。
例如,设置请求源1的等待响应周期数门限值为N1max,请求命令数门限值为M1max,第一响应函数为f(Mmax,Nmax)=Mmax×Nmax,优先级参数为P1,可计算得到请求源1的响应函数门限值为f(M1max,N1max)=M1max×N1max
步骤102:将所述请求源发送的请求命令写入FIFO中。
请求源发送请求命令,并将请求命令写入自己的先入FIFO中进行保存。
步骤103:在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值。
某一时刻,从请求源的FIFO中获取所述请求源的请求参数值,即获取当前请求源的FIFO中的等待响应周期数与请求命令数,然后将获取到的所述等待响应周期数与请求命令数代入第二响应函数中,进而得到响应函数值。
例如,某一时刻从请求源1的FIFO中获取到的等待响应周期数为N1,获取到的请求命令数为M1,将M1和N1代入第二响应函数f(M,N)=M×N中,可得到请求源1的响应函数值为f(M1,N1)=M1×N1。
步骤104:根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
仲裁器根据获取到的响应函数值、响应函数门限值以及设置的优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源进行响应。
例如,某一时刻,有三个请求源:请求源1、请求源2、请求源3,同时发起请求,仲裁器获取到请求源1、请求源2和请求源3的响应函数值、响应函数门限值以及设置的优先级参数后,分别判断请求源1、请求源2和请求源3的响应函数值是否大于等于各自的响应函数门限值,并根据判断结果确定出最先响应的一个请求源;如果在请求源1、请求源2和请求源3中只有请 求源1的响应函数值大于等于响应函数门限值,则响应请求源1;如果仅有请求源1和请求源2的响应函数值均大于等于各自的响应函数门限值,则响应这两个请求源中优先级参数较高的请求源;如果这三个请求源的响应函数值均小于各自的响应函数门限值,则响应响应函数值最高的请求源。
这里需要说明的是,在本发明实施例中,第一响应函数与第二响应函数可以按照实际需求进行设置,在此并不加以限制。
本发明实施例提供的请求源响应的仲裁方法,通过设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;将所述请求源发送的请求命令写入FIFO中;在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源;实现了对各请求源的响应进行实时、动态、均衡和高效的调度管理,充分利用了总线资源。
实施例二
图2为本发明实施例提供的请求源响应的仲裁方法的流程示意图二,如图2所示,本发明实施例提供的一种请求源响应的仲裁方法可以包括如下步骤:
步骤201:设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值。
首先,为每一个请求源设置请求参数门限值和优先级参数,并将设置的请求参数门限值代入第一响应函数中,计算得到响应函数门限值;其中,所述请求参数门限值包括等待响应周期数门限值和请求命令数门限值;所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数。
例如,可以设置请求源1、请求源2的请求命令数门限值Mmax分别为6、 7,等待响应周期数门限值Nmax分别为10、8,第一响应函数设置为f(Mmax,Nmax)=Mmax×Nmax,优先级参数分别为2、1,代表请求源1的优先级高于请求源2的优先级,根据第一响应函数可计算得到请求源1的响应函数门限值为60,请求源2的响应函数门限值为56。
步骤202:将请求源发送的请求命令写入FIFO中。
每个请求源均有一个用来保存请求命令的FIFO,各请求源发送请求命令,并将请求命令写入各自的FIFO中,这样,每个请求源都不必等待上一个请求命令得到响应就可以继续发送下一个请求命令。
例如,请求源1与请求源2发送请求命令,这时,请求源1将请求命令存入自己的FIFO中,请求源2将请求命令存入请求源2的FIFO中,请求命令存入之后不必考虑其是否得到响应便可以发送下一个请求命令。
步骤203:从FIFO中获取请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值。
从请求源向FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到该请求源得到响应为止;同时,统计在所述FIFO中存储的所述请求源的请求命令数;获取到的等待响应周期数和请求命令数即为请求源的请求参数值,然后将该请求参数值代入第二响应函数便可得到响应函数值。
例如,某一时刻获取到请求源1的等待响应周期数N为6,FIFO中存储的请求命令数M为3,设置的第二响应函数为f(M,N)=M×N,则可得到请求源1的响应函数值为18。
步骤204:在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值。
在获得全部请求源的响应函数门限值与响应函数值之后,分别判断每个请求源的响应函数值是否大于等于响应函数门限值,具体的如下所示:
S1:若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则执行步骤205至步骤209。
S2:若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则执行步骤210至步骤212。
S3:若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则执行步骤213。
步骤205:在全部请求源中判断是否有相等的响应函数值。
当全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值时,在全部请求源中判断是否有相等的响应函数值;若没有相等的响应函数值,则执行步骤206后执行步骤214;若有相等的响应函数值,则执行步骤207。
步骤206:在全部请求源中确定出响应函数值最高的请求源作为最先响应。
在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,而且该全部请求源的响应函数值均不相等时,将全部请求源中响应函数值最高的请求源确定为最先响应。
步骤207:在响应函数值相等的请求源中判断最高优先级参数是否相等。
在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,但该全部请求源中存在相等的响应函数值时,在响应函数值相等的请求源中判断最高优先级参数是否相等;若最高优先级参数不相等,则执行步骤208后执行步骤214;若最高优先级参数相等,则执行步骤209后执行步骤214。
步骤208:在响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应。
当全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,但该全部请求源中存在相等的响应函数值,而且这些响应函数值相等的请求源中的最高优先级参数不相等时,将这些响应函数值相等的请求源中优先级参数最高的请求源确定为最先响应。
步骤209:在响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
当全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,但该全部请求源中存在相等的响应函数值,而且这些响应函数值相等的请求源中的最高优先级参数相等时,将这些响应函数值相等的请求源中请求访问时间最早的请求源确定为最先响应。
步骤210:判断最高优先级参数是否相等。
当全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值时,在这两个或两个以上请求源中判断最高优先级参数是否相等;若最高优先级参数不相等,则执行步骤211后执行步骤214;若最高优先级参数相等,则执行步骤212后执行步骤214。
步骤211:确定出优先级参数最高的请求源作为最先响应。
当全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,并且,这两个或两个以上请求源中的最高优先级参数不相等时,将这两个或两个以上请求源中优先级参数最高的请求源作为最先响应。
步骤212:在最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
当全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,并且,这两个或两个以上请求源中的最高优先级参数相等时,在最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
步骤213:确定响应函数值大于等于响应函数门限值的请求源为最先响应。
当在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一请求源确定为最先响应。
步骤214:根据请求源的连续访问次数设置所述请求源的权重参数。
在请求源需要进行连续访问时,根据所述请求源的连续访问次数设置其权重参数,并存储于所述FIFO中;当请求源获得最先响应权限时,按照设置的权重参数值进行连续访问,每访问一次,该权重参数对应减1,直到减为0,才会重新发起对请求源的仲裁,即只有获得响应的请求源完成连续访问后,才会重新对所有请求源进行仲裁。
例如,某一时刻,请求源1获得了最先响应权限,其权重参数为5,等请求源1连续访问5次之后,才会再次发起对所有请求源的仲裁。
这里需要说明的是,在本发明实施例中,第一响应函数与第二响应函数可以按照实际需求进行设置,在此并不加以限制。
为了更加体现出本发明的目的,在上述实施例的基础上,进一步的举例说明。
图3为本发明实施例提供的请求源响应的仲裁过程示意图,如图3所示,以三个请求源为例,请求源1、请求源2和请求源3同时发起请求命令,每个请求源将请求命令发送并保存在各自的FIFO中,这三个请求源的FIFO深度为10;分别设置三个请求源的请求参数门限值、优先级参数以及第一响应函数与第二响应函数如表1所示:
表1
Figure PCTCN2017082634-appb-000001
Figure PCTCN2017082634-appb-000002
其中,请求源3需要优先处理,请求源1与请求源2具有相同的优先级;运算器则根据请求命令数门限值Mmax和等待响应周期数门值Nmax,即请求参数门限值,以及第一响应函数f(Mmax,Nmax)=Mmax×Nmax计算得到请求源1、请求源2和请求源3的响应函数门限值分别为70、70、20,进而将计算结果、第二响应函数及优先级参数发送给仲裁部分进行仲裁。
某一时刻,从请求源1的FIFO中得到请求源1的请求命令数M=5,等待响应周期数N=7,因此,请求源1的响应函数值为35,小于其响应函数门限值70;同一时刻,从请求源2的FIFO中获取到请求源2的请求命令数M=6,等待响应周期数N=4,因此,请求源2的响应函数值为24,小于其响应函数门限值70;同一时刻,从请求源3的FIFO中获取到请求源3的请求命令数M=2,等待响应周期数N=4,因此请求源3的响应函数值为8,小于其响应函数门限值20;由于这一时刻三个请求源中没有一个请求源的响应函数值大于等于响应函数门限值,因此根据其响应函数值的大小确定进行响应的请求源;由于这三个请求源的响应函数值均不相同,响应优先级顺序为:请求源1>请求源2>请求源3,因此响应请求源1;同时,请求源1的等待响应周期数被清为0重新开始计数。
过一定的时间后,如2秒(s),重新获取到三个请求源的请求命令数M分别为5、6、4,等待响应周期数N分别为8、9、6,因此得到三个请求源的响应函数值分别为40、54、24;在这一时刻,请求源1和请求源2的响应函数值依然小于各自的响应函数门限值,而请求源3的响应函数值则大于其响 应函数门限值,即在这三个请求源中只有请求源3的响应函数值大于响应函数门限值,因此响应请求源3。
过一定的时间后,如3s,获取到请求源2和请求源3的响应函数值均大于其各自的响应函数门限值,而请求源1的响应函数值小于其响应函数门限值,即在这三个请求源中有两个请求源的响应函数值大于等于响应函数门限值,因此根据这两个请求源的优先级参数确定最先响应的请求源;由于请求源2的优先级参数为1,请求源3的优先级参数为2,即优先级顺序为:请求源3>请求源2,因此响应请求源3。
过一定的时间后,如1s,获取到请求源1和请求源2的响应函数值均大于其各自的响应函数门限值,而请求源3的响应函数值小于其响应函数门限值,即在这三个请求源中有两个请求源的响应函数值大于等于响应函数门限值,因此根据这两个请求源的优先级参数确定最先响应的请求源,但请求源1和请求源2的优先级参数相同,均为1,因此需要按照轮询的方式依次进行响应,即请求源1的请求访问时间最早,因此最先响应请求源1。
进一步地,假如请求源1的访问是通过总线协议(Advanced eXtensible Interface,AXI)进行的,因此支持突发(burst)访问;某一时刻,请求源1获得响应权限,且根据AXI协议的burst长度(AWLEN/ARLEN)来设置权重参数,假设AWLEN/ARLEN=9,则设置权重参数为10,因此,请求源1获得了连续10次的访问权限;等请求源1连续访问10次以后,才会再次发起对这三个请求源的仲裁。
本发明实施例提供的请求源响应的仲裁方法,通过设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;将请求源发送的请求命令写入FIFO中;从FIFO中获取请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;在全部请求源中分别判断每个请求源的响应函数值是否大于等于 响应函数门限值;若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值;若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等;若最高优先级参数不相等,则在响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;若最高优先级参数相等,则在响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应;若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则判断最高优先级参数是否相等;若最高优先级参数不相等,则确定出优先级参数最高的请求源作为最先响应;若最高优先级参数相等,则在最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则确定响应函数值大于等于响应函数门限值的请求源为最先响应;根据请求源的连续访问次数设置所述请求源的权重参数;实现了对各请求源的响应进行实时、动态、均衡和高效的调度管理,充分利用了总线资源。
实施例三
图4为本发明实施例提供的请求源响应的仲裁装置的结构示意图;如图4所示,本发明实施例提供的请求源响应的仲裁装置04包括:缓存模块41,写入模块42,仲裁模块43;其中,
所述缓存模块41,配置为设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;
其中,所述请求参数门限值包括:等待响应周期数门限值、请求命令数门限值;所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数;
所述写入模块42,配置为将所述请求源发送的请求命令写入FIFO中;
所述缓存模块41,还配置为在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;
其中,所述请求参数值包括:等待响应周期数、请求命令数;所述第二响应函数为等待响应周期数与请求命令数的函数;
所述仲裁模块43,配置为根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
作为一种实施方式,所述缓存模块41,还配置为在所述请求源需要连续访问时,根据所述请求源的连续访问次数设置所述请求源的权重参数;
其中,所述请求源的权重参数存储于所述FIFO中。
作为一种实施方式,所述仲裁模块43,具体配置为:在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值,
若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一个请求源确定为最先响应;
若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则在这两个或两个以上请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这两个或两个以上请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;
若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值,
若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;
若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等,
若最高优先级参数不相等,则在这响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;
若最高优先级参数相等,则在这响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
作为一种实施方式,所述缓存模块41,还具体配置为:统计在所述FIFO中存储的所述请求源的请求命令数;所述请求源向所述FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到所述请求源得到响应为止。
本实施例的装置,可以用于执行上述所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
在实际应用中,所述缓存模块41,写入模块42,仲裁模块43均可由位于请求源响应的仲裁装置04中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。
本发明实施例还记载了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述各个实施例所述的请求源响应的仲裁方法。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
工业实用性
本发明实施例的技术方案通过设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;将所述请求源发送的请求命令写入FIFO中;在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在 全部请求源中确定出最先响应的一个请求源;如此,实现了对各请求源的响应进行实时、动态、均衡和高效的调度管理,充分利用了总线资源。

Claims (11)

  1. 一种请求源响应的仲裁方法,所述方法包括:
    设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;
    将所述请求源发送的请求命令写入先入先出队列FIFO中;
    在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;
    根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
  2. 根据权利要求1所述的方法,其中,在全部请求源中确定出最先响应的一个请求源之后,所述方法还包括:
    在所述请求源需要连续访问时,根据所述请求源的连续访问次数设置所述请求源的权重参数;所述请求源的权重参数存储于所述FIFO中。
  3. 根据权利要求1所述的方法,其中,
    所述请求参数门限值:包括等待响应周期数门限值、请求命令数门限值;
    所述请求参数值:包括等待响应周期数、请求命令数;
    所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数;
    所述第二响应函数为等待响应周期数与请求命令数的函数。
  4. 根据权利要求3所述的方法,其中,所述根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源包括:
    在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值,
    若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一个请求源确定为最先响应;
    若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则在这两个或两个以上请求源中判断最高优先级参数是否相等,
    若最高优先级参数不相等,则在这两个或两个以上请求源中确定出优先级参数最高的请求源作为最先响应;
    若最高优先级参数相等,则在这最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;
    若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值,
    若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;
    若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等,
    若最高优先级参数不相等,则在这响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;
    若最高优先级参数相等,则在这响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
  5. 根据权利要求3所述的方法,其中,所述在所述FIFO中得到所述请求源的请求参数值,包括:
    统计在所述FIFO中存储的所述请求源的请求命令数;
    所述请求源向所述FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到所述请求源得到响应为止。
  6. 一种请求源响应的仲裁装置,所述装置包括:
    缓存模块,配置为设置请求源的请求参数门限值、优先级参数,并根据所述请求参数门限值与第一响应函数得到响应函数门限值;
    写入模块,配置为将所述请求源发送的请求命令写入先入先出队列FIFO中;
    所述缓存模块,还配置为在所述FIFO中得到所述请求源的请求参数值,并根据所述请求参数值与第二响应函数得到响应函数值;
    仲裁模块,配置为根据所述响应函数值、响应函数门限值、优先级参数之间的预设规则,在全部请求源中确定出最先响应的一个请求源。
  7. 根据权利要求6所述的装置,其中,所述缓存模块还配置为:
    在所述请求源需要连续访问时,根据所述请求源的连续访问次数设置所述请求源的权重参数;所述请求源的权重参数存储于所述FIFO中。
  8. 根据权利要求6所述的装置,其中,
    所述请求参数门限值:包括等待响应周期数门限值、请求命令数门限值;
    所述请求参数值:包括等待响应周期数、请求命令数;
    所述第一响应函数为等待响应周期数门限值与请求命令数门限值的函数;
    所述第二响应函数为等待响应周期数与请求命令数的函数。
  9. 根据权利要求8所述的装置,其中,所述仲裁模块,具体配置为:
    在全部请求源中分别判断每个请求源的响应函数值是否大于等于响应函数门限值,
    若在全部请求源中只有一个请求源的响应函数值大于等于响应函数门限值,则将这一个请求源确定为最先响应;
    若在全部请求源中有两个或两个以上请求源的响应函数值大于等于响应函数门限值,则在这两个或两个以上请求源中判断最高优先级参数是否 相等,
    若最高优先级参数不相等,则在这两个或两个以上请求源中确定出优先级参数最高的请求源作为最先响应;
    若最高优先级参数相等,则在这最高优先级参数相等的请求源中确定出请求访问时间最早的请求源作为最先响应;
    若在全部请求源中没有一个请求源的响应函数值大于等于响应函数门限值,则在全部请求源中判断是否有相等的响应函数值,
    若没有相等的响应函数值,则在全部请求源中确定出响应函数值最高的请求源作为最先响应;
    若有相等的响应函数值,则在响应函数值相等的请求源中判断最高优先级参数是否相等,
    若最高优先级参数不相等,则在这响应函数值相等的请求源中确定出优先级参数最高的请求源作为最先响应;
    若最高优先级参数相等,则在这响应函数值相等的请求源中确定出请求访问时间最早的请求源作为最先响应。
  10. 根据权利要求8所述的装置,其中,所述缓存模块,还具体配置为:
    统计在所述FIFO中存储的所述请求源的请求命令数;
    所述请求源向所述FIFO中写入请求命令开始时,统计所述请求源的等待响应周期数,直到所述请求源得到响应为止。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的请求源响应的仲裁方法。
PCT/CN2017/082634 2016-09-19 2017-04-28 请求源响应的仲裁方法、装置及计算机存储介质 WO2018049821A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610832492.X 2016-09-19
CN201610832492.XA CN107844442A (zh) 2016-09-19 2016-09-19 请求源响应的仲裁方法及装置

Publications (1)

Publication Number Publication Date
WO2018049821A1 true WO2018049821A1 (zh) 2018-03-22

Family

ID=61619840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/082634 WO2018049821A1 (zh) 2016-09-19 2017-04-28 请求源响应的仲裁方法、装置及计算机存储介质

Country Status (2)

Country Link
CN (1) CN107844442A (zh)
WO (1) WO2018049821A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038573A (zh) * 2006-03-17 2007-09-19 上海奇码数字信息有限公司 总线仲裁方法
US20080059675A1 (en) * 2006-08-31 2008-03-06 Fujitsu Limited Method and apparatus for arbitrating access
CN102316133A (zh) * 2010-07-01 2012-01-11 中国移动通信集团上海有限公司 一种负载均衡方法及装置
CN102404183A (zh) * 2010-09-07 2012-04-04 中兴通讯股份有限公司 仲裁方法和仲裁器
CN104346303A (zh) * 2013-08-08 2015-02-11 中兴通讯股份有限公司 一种总线仲裁方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145033A (en) * 1998-07-17 2000-11-07 Seiko Epson Corporation Management of display FIFO requests for DRAM access wherein low priority requests are initiated when FIFO level is below/equal to high threshold value
JP4847036B2 (ja) * 2005-03-30 2011-12-28 キヤノン株式会社 バスアクセスを調停する制御装置およびデータ処理装置の制御方法
US8245232B2 (en) * 2007-11-27 2012-08-14 Microsoft Corporation Software-configurable and stall-time fair memory access scheduling mechanism for shared memory systems
CN103257942B (zh) * 2013-03-27 2015-12-02 青岛中星微电子有限公司 一种片上系统共享总线请求处理的方法及装置
CN104503728B (zh) * 2015-01-04 2017-11-24 华为技术有限公司 一种硬件加速器及芯片

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038573A (zh) * 2006-03-17 2007-09-19 上海奇码数字信息有限公司 总线仲裁方法
US20080059675A1 (en) * 2006-08-31 2008-03-06 Fujitsu Limited Method and apparatus for arbitrating access
CN102316133A (zh) * 2010-07-01 2012-01-11 中国移动通信集团上海有限公司 一种负载均衡方法及装置
CN102404183A (zh) * 2010-09-07 2012-04-04 中兴通讯股份有限公司 仲裁方法和仲裁器
CN104346303A (zh) * 2013-08-08 2015-02-11 中兴通讯股份有限公司 一种总线仲裁方法及装置

Also Published As

Publication number Publication date
CN107844442A (zh) 2018-03-27

Similar Documents

Publication Publication Date Title
KR102553932B1 (ko) 컴퓨터 이미징 파이프라인
JP5963282B2 (ja) 割り込み分配スキーム
US10078470B2 (en) Signal transfer device that maintains order of a read request and write request in posted write memory access
JP5578713B2 (ja) 情報処理装置
JP2015505114A (ja) 動的優先制御のシステムおよび方法
US20110197038A1 (en) Servicing low-latency requests ahead of best-effort requests
WO2017071176A1 (zh) 一种图像处理方法与图像处理装置
US8838862B2 (en) Data transfer device, method of transferring data, and image forming apparatus
WO2015187824A1 (en) Command trapping in an input/output virtualization (iov) host controller (hc) (iov-hc) of a flash-memory-based storage device
TW201303870A (zh) 利用快閃記憶體介面的方法及裝置
WO2017071429A1 (zh) 一种数据访问方法及总线
WO2016206463A1 (zh) 一种写操作控制方法、装置及系统
JP6201591B2 (ja) 情報処理装置および情報処理装置の制御方法
WO2020026010A2 (zh) 任务执行的调控方法、装置、设备/终端/服务器及存储介质
WO2018049821A1 (zh) 请求源响应的仲裁方法、装置及计算机存储介质
JP5981004B2 (ja) 半導体装置
JP2003085127A (ja) デュアルバスを有する半導体装置、デュアルバスシステム及びメモリ共有デュアルバスシステム並びにそれを用いた電子機器
US20140379846A1 (en) Technique for coordinating memory access requests from clients in a mobile device
US9916243B2 (en) Method and apparatus for performing a bus lock and translation lookaside buffer invalidation
JP2004194014A (ja) バス制御装置及び情報処理システム
JP2012079165A (ja) バス調停装置、バス調停方法
CN111177048A (zh) 一种ahb总线的设备及其进行数据流传输的方法
US9268722B1 (en) Sharing memory using processor wait states
US20230244623A1 (en) Arbitration Allocating Requests During Backpressure
US20150019776A1 (en) Selective change of pending transaction urgency

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: 17850027

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17850027

Country of ref document: EP

Kind code of ref document: A1