Exemplary embodiments of the invention will be described in detail with reference to the following drawings, wherein:
A first bus master 11, a second bus master 13, CPU 14, a primary storage device 15, a secondary storage device 16, a printing device 18, a reading device 17, and a facsimile device 19 (and the like) are connected to a system bus 12 in the device system 10, and a signal (data signal, control signal) can be exchanged therebetween.
The CPU 14 performs editing, processing and computing information (such as image data).
The pieces of information in which the edit and the like are performed by the CPU 14 are collectively stored and managed in the secondary storage device 16. The information stored in the secondary storage device 16 can be shared with respect to the information obtaining request from the CPU 14.
The information is transmitted to the printing device 18, and the printing device 18 performs a print process to a predetermined recording sheet by a driver previously installed in CPU 14.
In the reading device 17, scanning is performed by placing an original on an original plate provided in an upper portion of the reading device 17 (for example, in a case of “multi-copier”). A CCD sensor reads an original image to generate digital image data by the scanning. The digital image data is transmitted to CPU 14 which makes the scanning request, the previously assigned CPU 14, or the secondary storage device 16.
In the printing device 18, the digital image data read by the reading device 17 is directly transmitted to a printer function to be able to print the same image as the original image in the predetermined recording sheet.
The facsimile device 19 performs transmission and reception of data through public telephone line. The facsimile device 19 transmits the image read by the reading device 17, and the image received by the facsimile device 19 is printed in the predetermined recording sheet with the printing device 18.
In the device system 10 having the above-described configuration, the first bus master 11, the second bus master 13, CPU 14, the primary storage device 15, the secondary storage device 16, the printing device 18, the reading device 17, and the facsimile device 19 each makes request of the use right with respect to the bus 12, so that sometimes the requests of use right are concentrated in the same period.
The arbitration function is provided in each device to perform arbitration to the use request of bus 12 by the arbitration function, the order of the use right is set so as to assign the use right of the bus 12 in non-uniform manner. (The case with the CPU 14, the secondary storage device 16, and the printing device 18 will be described below by way of example.)
Even though the arbitration is performed by the arbitration function, the bus master to which the use right is not given for a long time exists because the priority is basically determined, and the deadlock is generated in this bus master because the state in which the use right is not given continues for a long time. Particularly, when the use right of the bus is not given to one function of the plural functions of the printing device 18, the trouble that other functions cannot be performed is generated.
Therefore, a deadlock monitoring unit 20 (see
An internal bus arbiter 24 which controls the arbitration function is connected to the bus 12. The bus monitoring circuit 26 which constitutes a part of the deadlock monitoring unit 20 is connected to the bus 12.
The internal bus arbiter 24 outputs, between the bus 12, execute request signals of plural functions (expressed by Func. 1, Func. 2, . . . , and Func. N in
The request switching circuit 28 which constitutes the deadlock monitoring unit 20 together with the bus monitoring circuit 26 is placed between the internal bus arbiter 24 and the Func. 1, Func. 2, . . . , and Func. N.
The request switching circuit 28 and the bus monitoring circuit 26 are directly connected to each other. The bus monitoring circuit 26 sends a signal (switching signal) to the request switching circuit 28 when predetermined condition is satisfied in the bus monitoring circuit 26.
An interval counter 30 is connected to the bus monitoring circuit 26. An interval register 32 is connected to the interval counter 30.
A predetermined interval (period) is set to the interval register 32, and the bus monitoring circuit 26 is started up in each time when a count value counted by the interval counter 30 reaches the predetermined interval. The bus monitoring circuit 26 monitors whether the request of the use right of the bus 12 is normally finished within a predetermined count (predetermined period) or retry (re-request) is requested.
The bus monitoring circuit 26 counts the number of times of the retry requested, and outputs the switching signal when the number of retry requests reaches predetermined times within the predetermined period.
On the other hand, N internal connection terminals 28A corresponding to the functions (Func. 1, Func. 2, . . . , and Func. N) are provided in the request switching circuit 28, and the signals are transmitted and received to and from the Func. 1, Func. 2, . . . , and Func. N through the internal connection terminals 28A respectively.
N external connection terminals 28B connected to the internal bus arbiter 24 are also provided in the request switching circuit 28.
In the request switching circuit 28, the internal connection terminals 28A and the external connection terminals 28B can be connected to each other. In the steady state (the retry is hardly generated and each function is performed at a predetermined cycle), the connection relationship between the internal connection terminal 28A and the external connection terminal 28B is fixed in the request switching circuit 28 (see
In other words, the connection is established to another function different from the function recognized by the internal bus arbiter 24.
The above mentioned two kinds of switching patterns can be explained below as typical representatives.
(1) One-time order changing switching pattern in cycle
As shown in
That is, the function F2 is executed in advance in a point in which the function F1 is allocated. At this point, the internal bus arbiter 24 does not recognize this fact.
(2) Continuous execution switching pattern
In the continuous execution switching pattern, a point in which the function F2 is allocated is, what is called, taken away by the function F1, and the function F2 is not permitted to use the bus 12 till the next arbitration. Therefore, the function F2 is skipped to the next arbitration. At this point, the internal bus arbiter 24 does not recognize this fact.
The deadlock which may be possibly generated by continuing the steady state is eliminated by one of the above mentioned switching patterns. Because the internal bus arbiter 24 does not recognize the fact as described above, the already-existing data transfer control system can be utilized.
The operation of the exemplary embodiment will be described with reference to a flowchart shown in
A retry count value R is reset (R=0) in Step 100, and each function is executed in the steady state cycle (see
In Step 104, it is judged whether or not it comes to the monitoring time. When the negative judgment is made in Step 104, the flow returns to Step 102.
When the affirmative judgment is made in Step 104, the flow goes to Step 106, and it is judged whether or not the retry request is made.
When the negative judgment is made in Step 106, the flow goes to Step 108, and it is judged whether or not the predetermined time has elapsed.
When the affirmative judgment is made in Step 106, the R value is incremented in order to count the number of times of the retry request in Step 110, and the flow goes to Step 112. In Step 112, it is judged whether or not the count value reaches the predetermined value previously set.
When the negative judgment is made in Step 112, the flow goes to Step 108, and it is judged whether or not the predetermined time has elapsed.
When the negative judgment is made in Step 108, namely when the predetermined time has not elapsed, the flow returns to Step 102, and the above steps are repeated.
When the affirmative judgment is made in Step 108, it is judged that the waiting time long enough to cause the generation of the deadlock has not elapsed, and the retry count value R is reset in Step 114. Then the routine is ended.
When the affirmative judgment is made in Step 112, it is judged that the dead lock is possibly generated, the flow goes to Step 116, and the bus monitoring circuit 26 outputs the switching signal to the request switching circuit 28.
In Step 118, the switching pattern (1) or the switching pattern (2), i.e.,
In Step 120, the switching control is executed by the read switching pattern (1) or (2). Therefore, because the function different from the function recognized by the internal bus arbiter 24 is executed, the deadlock caused by the continuous retries can be prevented.
Thus, in the exemplary embodiment of the invention, when the plural bus masters are connected to the bus 12, the deadlock generated in simultaneously making the requests of the use right of the bus 12 is prevented by switching the functions on the bus master side. In this case, the functions of the internal bus arbiter 24 incorporated into the bus master is not changed, and only the request switching circuit 28 is arranged between the internal bus arbiter 24 and each function. Therefore, the deadlock can be prevented with simple circuit configuration. Furthermore, the internal bus arbiter 24 does not recognize that the functions are switched. Therefore, it is not necessary to largely change the control program and the like.
In the exemplary embodiment, the request switching circuit 28 is provided between the internal bus arbiter 24 and each of the functions (Func. 1, Func. 2, . . . , and Func. N). The function of the request switching circuit 28 may be added to the internal bus arbiter 24 (see
In this case, it is necessary to change the already-existing internal bus arbiter 24, while the already-existing data transfer control system can be used as it is in the above mentioned exemplary embodiment. However, because the device configuration can be simplified, the configuration shown in
| Number | Date | Country | Kind |
|---|---|---|---|
| 2006-142760 | May 2006 | JP | national |