1. Field of the Invention
The present invention relates to an arbiter and an arbitrating method thereof and, more particularly, to an arbiter and an arbitrating method capable of arbitrating a mastership of a bus based on the latency cycle of each master and the priority of transaction.
2. Description of the Prior Art
Recently, computer systems have evolved toward more real time applications, including multimedia applications such as video and audio, video capture and playback, telephony, and speech recognition. Therefore, in computer systems, a bus is usually coupled to a plurality of masters, such as a central processing unit (CPU), a video adapter, an audio adapter, or other peripheral devices, so as to execute various programs, and an arbiter in charge of arbitrating the mastership of the bus.
In prior art, the arbiter of the computer system utilizes predetermined priority to determine which master will possess the bandwidth of the bus. In other words, when a master with a higher level of priority sends request signals continuously to the arbiter, the bandwidth of the bus will always be occupied by the master, interfering the execution of other real time applications that leads to problems such as asynchronous video/audio playback and discontinuous frames.
To solve the aforesaid problems, the prior art may have to increase the First-In First-Out (FIFO) memory capacity in the computer system. However, increased FIFO memory with a raise of cost does no help to the optimization of bandwidth distribution.
Therefore, the scope of the present invention is to provide an arbiter and an arbitrating method thereof to solve the aforementioned problems.
A scope of the invention is to provide an arbiter and an arbitrating method thereof capable of arbitrating the mastership of a bus based on the latency cycle of each master and the priority of transaction.
According to a preferred embodiment of the invention, the arbiter is used for arbitrating the mastership of a bus, and the bus is coupled to a plurality of masters. In this embodiment, the arbiter comprises a request detection unit, a latency count unit, a grant generation unit, and an arbitration control unit. The latency count unit is coupled to the request detection unit, and the arbitration control unit is coupled to the latency count unit and the grant generation unit.
In this embodiment, the request detection unit is used for detecting a plurality of request signals, each of which corresponds to one of the masters. The latency count unit is used for counting the decayed latency of each request signal according to a latency cycle of each request signal. The latency count unit further compares the decayed latency of each request signal, so as to determine the level of priority given to a designated master. The arbitration control unit is configured to control the grant generation unit to selectively generate a grant signal according to the level of priority, such that the designated master with a higher level of priority obtains the mastership of the bus based on the grant signal.
Therefore, the arbiter of the invention is capable of arbitrating the mastership of the bus based on the latency cycle of each master and the priority of transaction. Accordingly, the bandwidth of the bus can be optimized without increasing the FIFO memory, so as to save the cost.
The advantage and spirit of the invention may be understood by the following recitations together with the appended drawings.
Referring to
In this embodiment, the arbiter 12 is used for arbitrating a mastership of the bus 10. As shown in
Referring to
The request detection unit 120 is used for detecting the request signals req0-req3 and for notifying the latency count unit 122 of the requests from the masters M0-M3. In this embodiment, each of the masters M0-M3 outputs a latency cycle while it outputs the corresponding request signal req0-req3. The latency count unit 122 is used for counting the amount of decayed latency of each request signal req0-req3 according to the latency cycle of each request signal req0-req3. The latency count unit 122 further compares the decayed latency of each request signal req0-req3, so as to determine the level of priority given to a designated master M0-M3. The latency cycle of each request signal will decay as time goes on, and the decayed latency may decay in a linear or non-linear fashion. That is to say, the latency cycle may decay either with a fixed value over a fixed span of time or a specific value over a fixed span of time according to a specific rule. The arbitration control unit 126 is configured to control the grant generation unit 124 to selectively generate a grant signal gnt0-gnt3 according to the level of priority, such that the designated master M0-M3 with a higher level of priority can possess the mastership of the bus 10 based on the grant signal gnt0-gnt3. Furthermore, when the designated master M0-M3 which owns the mastership of the bus 10 terminates its operation, the latency count unit 122 is configured to reset the level of priority given to other masters M0-M3.
Referring to
When the request detection unit 120 detects the request signals req0 at time T2, it will notify the latency count unit 122 of the request from the master M0, wherein the latency cycle of the request signal req0 is 40. At the same time, the latency count unit 122 further counts the decayed latency of the request signal req0 at other times (T3, T4, . . . ) according to the latency cycle. When the master M1 which owns the mastership of the bus 10 terminates, the latency count unit 122 will reset the level of priority given to the master M0 or M3.
At time T4, the decayed latency of the request signal req0 is smaller than that of the request signal req3, so the priority of the master M0 is higher than that of the master M3. The arbitration control unit 126 then controls the grant generation unit 124 to generate a grant signal gnt0, such that the master M0 can get the mastership of the bus 10 at time T5 based on the grant signal gnt0. When the master M0 which owns the mastership of the bus 10 terminates at time T9, the latency count unit 122 will reset the level of priority given to the master M3. In other words, since there are no other masters competing with the master M3, the arbitration control unit 126 controls the grant generation unit 124 to generate a grant signal gnt3, such that the master M3 can get the mastership of the bus 10 at time T10 based on the grant signal gnt3. Accordingly, the arbiter 12 of the invention is capable of arbitrating the mastership of the bus 10 based on the latency cycle of each master and the priority of transaction, so as to optimize the bandwidth of the bus 10.
Referring to
Referring to
It should be noted that the latency count unit could be designed based on different applications.
Referring to
Referring to
When the designated master which owns the mastership of the bus 10 terminates, the method of the invention will reset the level of priority given to other masters M0-M3.
The arbiter of the invention is capable of arbitrating the mastership of the bus based on the latency cycle of each master and the priority of transaction. Accordingly, the bandwidth of the bus can be optimized without additional FIFO memory, thus saving manufacturing costs.
With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 095108876 | Mar 2006 | TW | national |