DEVICE FOR CONTROLLING BUS

Abstract: A device for controlling buses which reduces the time for waiting bus accesses and particularly improves the performance of an arithmetic processing means which frequently access a main memory. The device is provided with a means (12b) for generating a bus request signals in response to the requests from an arithmetic processing means (12a), a means (e) for arbitrating the rights of using the buses which arbitrates the rights of using the buses in response to the bus request signals and informs the unit of the result, a means (12c) for performing bus accesses using the means (12a) as a bus master after receiving the information on the right of using the buses, and a hold indicating means (12d) for making the bus request signals held while a predetermined hold signal is asserted and a predetermined release signal is negated.

Description: TECHNICAL FIELD This invention relates to a bus controller. BACKGROUND ART Operation speeds of microcomputer's semiconductor circuits including processing units, a main storage, and an I/O interface have improved in recent years. These processing units are connected to one another through a bus, and a bus access speed sometimes limits the performance of the processing units when the processing units frequently access the main storage and I/O interface through the bus. Figure 1 is a timing chart showing a bus control system according to a prior art. In the figure, one processing unit provides a data access request for accessing another processing unit that may be a main storage (a storage means). An internal bus access signal is changed from a high logic to a low logic, and according to this change, an access request signal (HREQ#) is asserted. Here, the mark "#" indicates that the signal is of low activity. The signal HREQ# is sent to, for example, an arbiter circuit that arbitrates a bus right. If the bus right is free, the arbiter circuit provides a bus right acquisition acknowledge signal (HACK#). Upon receiving the signal HACK#, the processing unit becomes a bus master having the bus right to access the main storage (storage means) to write and read data. When the signal HREQ# is negated, the arbiter circuit recognizes this and negates the signal HACK# to release the bus right. Transferring the two signals (HREQ# and HACK#) is called "bus arbitration." This kind of conventional bus control system carries out the bus arbitration whenever a bus request is raised, so that, when the bus request is repeatedly issued, a bus access wait time is prolonged to deteriorate processing performance. The bus access wait time is a time from asserting the signal HREQ# to receiving the asserted HACK# (a time ta in Fig. 1) and a time from providing a bus request to asserting the signal HREQ# (a time tb in Fig. 1). A wait time Σt accompanied by a single bus request is expressed as follows: Σt = ta A wait time Σtn for n times of bus requests is expressed as follows: Σtn = (ta. n) + {tb. (n-1)} Namely, as the number of bus requests increases, the wait time becomes longer. This may hinder the performance of a processing unit, i.e., a bus request source that frequently accesses the storage means. EP-A-0426183, which is a document as referred to in Article 54(3) EPC, discloses a bus access system in which the CPU may indicate a wish of control of the bus and thus attain it by preempting any arbitration grant of use when the bus becomes available. Figure 2 shows two processing units (processing means) (A and B) sharing memory (storage means) 10 through a common bus 1. When the processing unit B frequently accesses the memory, the efficiency of the system as a whole may deteriorate because the bus arbitration takes a long time. An object of the invention is to reduce the bus access wait time and improve the performance of a processing unit, i.e., a bus request source that frequently accesses a storage means. DISCLOSURE OF THE INVENTION To achieve the object, the invention provides a bus controller used for a processing system having a plurality of processing means, a bus, and storage means accessed by the processing means through the bus the specifics of which are defined in claim 1. At least some of the processing means have at least one of the bus controller forming means such as a bus right request signal generation means for providing a bus right request signal to another processing means, bus access means for accessing the bus after receiving a bus right acquisition acknowledgement, hold instruction means for generating a hold signal for holding the acquired bus right, bus right arbitration means for arbitrating bus right request signals from the processing means and notifying the processing means of a result of the arbitration, and bus right release signal generation means for generating a release signal to release the bus right acquired by the processing means. Based on this basic technical configuration, the bus controller comprises a request signal generation means for generating a bus request signal in a given bus request source (one processing means), bus right arbitration means for arbitrating a bus right in response to the bus request signal and imparting the result of the arbitration bus access means for accessing upon receiving a bus right acquisition acknowledgement; the bus with the bus request source (the processing means) as a bus master hold instruction means for providing an instruction to hold the request signal while a predetermined hold signal is being asserted and a predetermined release signal is being negated. When the bus request source intermittently requests the bus right, it is preferable to assert the hold signal. If another bus request source (another processing means), which is different from the bus request source (processing means) that is holding the bus right but shares the bus therewith, is going to request the bus right, the release signal will be asserted to release the bus held. According to the invention, the bus right is continuously provided to the bus request source having the bus right if the hold signal is asserted and the released signal is negated. As a result, only one time of the bus arbitration will do for a plurality of bus requests to shorten a wait time as follows: from Σtn = (ta. n) + {tb. (n-1)} to Σt = ta When the bus request source holding the bus right is busy, i.e., intermittently requesting the bus right when the hold signal is asserted, the bus request source (processing circuit) will continuously be the bus master. This may shorten the processing time and improve the performance of the processing circuit. If another bus request source (processing means) that is different from the bus request source (processing means) having the bus right but sharing the bus therewith does not request the bus right while the bus request source in question is holding the bus right, the release signal will be kept negated. As a result, the bus request source in question can be continuously the bus master to continuously hold the bus. When another bus request source is going to request the bus right during the bus holding state of the bus request source in question, the release signal is asserted to immediately release the bus right, and another bus request source acquires the bus right. The invention also relates to a bus controller as defined in claim 8. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a timing art showing an operation of a bus controller according to a prior art. Figure 2 is a schematic view showing a system employing the bus controller according to the prior art. Figure 3 is a view showing a principle of the invention. Figures 4 through 8 are views showing a bus control system according to an embodiment of the invention, in which: Fig. 4 is a schematic view; Fig. 5 is a timing chart showing a normal state and a bus right holding state; Fig. 6 is a timing chart showing a bus right releasing operation; Fig. 7 is a schematic view showing an example of a request signal generation and hold means; and Fig. 8 is a view showing external terminals of a second processing unit. Figure 9 is a flowchart showing operations of the invention. Figure 10 is a detailed circuit diagram showing first and second processing units connected to each other without an external arbiter circuit, according to the invention. Figure 11 is a view showing an example of a second processing unit using an external arbiter circuit, according to the invention. BEST MODE OF CARRYING OUT THE INVENTION Bus controllers according to the invention will be explained in detail with reference to the drawings. Figure 3A shows a principle of a bus controller according to the invention. A processing system comprises a plurality of processing means (11, 12, 13, ..., 1n), a bus 1, and storage means 10 accessed by the processing means through the bus. Each of the processing means (11 through 1n) includes a processing unit (a bus request source) (a) and a control unit S. The control unit S involves at least one of the below-mentioned means, which have different functions and selected as required. Namely, the control unit S may include a bus right request signal generation means b for providing a bus right request signal (HREQ#) to other processing means (12, 13, ..., 1n), bus access means (c) for accessing the bus upon receiving a bus right acquisition acknowledgement, hold instruction means d for generating a hold signal (BHREQ#) for holding an acquired bus right, bus right arbitration means (e) for arbitrating bus right request signals (HREQ#) from other processing means 12 to In and notifying them of a result of the arbitration, and bus right release signal generation means (f) for generating a release signal (BRL#) for releasing the bus right acquired by the processing means. The control units S (S11 through S1n) of the processing means (11 through 1n) have at least one of the means (a) through (f) that are selected as required. For example, the processing means 11 of Fig. 3A may be main processing means (cpu) in the processing system. In this case, this processing means most frequently accesses the storage means 10 through the bus, so that it is preferable that this processing means has priority of accessing the storage means over the other processing means (12 to 1n). For this purpose, the control unit S of the processing means 11 may have the bus right arbitration means (e) and the bus right release signal generation means (f). The control units S of the other processing means (12 through 1n) may have the bus right request signal generation means (b), bus access means (c), and hold instruction means (d). When the number of the processing means is small, the above arrangement is particularly effective because the processing means can directly exchange information between them, like exclusive-use circuits. Figure 4 shows another arrangement. In Fig. 4, the bus right arbitration means (e) is arranged independently of the processing means 11 to 1n. In this case, the processing means 11 may be main processing means having the release signal generation means (f). The other processing means 12 to In may have the bus right request signal generation means (b), bus access means (c), and hold instruction means (d). In the above two embodiments, the hold instruction means (d) disposed in one processing means responds to a release signal from the release signal generation means (f) disposed in another processing means, and releases the bus right. In the above embodiments, it is preferable to handle the release signal before the hold instruction signal. An operation of the bus controller according to the invention will be explained in detail with reference to Figs. 3B and 4. Figure 4 shows the memory 10, first processing unit 11, second processing unit 12, and arbiter circuit 13, i.e., the bus right arbitration means (e). These are connected to one another through an address bus A-BUS, a control bus C-BUS, and a data bus D-BUS. The first processing unit 11 includes, for example, a processor (another bus request source) 11a, a cache 11b, etc. The processing unit 11 properly accesses data in the memory 10, to store the data in the cache 11b, and uses the data in the cache 11b to carry out given processes. The processing unit 11 also includes the release signal generation means (f) for providing a bus right releasing request signal to another processing unit. The second processing unit 12 includes a processor, or an I/O, or a coprocessor 12a (a given bus request source), request signal generation means 12b for generating a bus request signal (HREQ#, the mark "#" indicating that the signal is of low active) according to a bus request from the bus request source 12a, bus access means 12c for accessing the buses after receiving a bus right acquisition acknowledge signal (HACK#) from the arbiter circuit e, and hold instruction means 12d for letting the bus request signal (HREQ#) be continuously generated while a predetermined hold signal (BHREQ#) is being asserted and a predetermined release signal (BRL#) is being negated. Upon receiving the bus right, the bus request source 12a starts to serve as a bus master for accessing data in the memory 10. The arbiter circuit (b) is the bus right arbitration means that receives a bus request signal from the first and second processing units 11 and 12, and according to the signal, checks the statuses of the buses. When the buses are free, the arbiter circuit generates the bus right acquisition acknowledge signal (HACK#). Reference mark BUSY# is a busy signal of the bus request source 12a, DC# is a memory access completion signal generated by the memory 10, and BRL# is the release signal. For example, this release signal BRL# is issued to the bus arbiter (b) according to a request of the first processing unit 11, and then the bus arbiter (e) provides the signal BRL#. When the first processing unit 11 wants to acquire the buses while the second processing unit 12 is holding the bus right, or when the first processing unit is going to forcibly release the buses, the processing unit 11 requests the arbiter (b) to assert the signal BRL#. After receiving the release request signal, the bus right arbitration means (e) finds the processing unit that is holding the bus right, and provides the processing unit with a release request. Figure 5 is a timing chart showing an operation of the embodiment. An upper half of the figure shows a "normal operation" with the signal BHREQ# being negated, and a lower half of the figure shows a "bus right hold operation" with the signal BHREQ# being asserted. During the normal operation, the bus request source 12a may generate bus access requests (R1) and (R2). In response to these requests (R1) and (R2), the signal HREQ# is asserted, and after receiving the signal HACK# from the arbiter circuit (b), the bus accesses (R1) and (R2) are successively carried out. During the normal operation, the two signals (HREQ# and HACK#) are transferred whenever the buses are accessed, so that two times of "bus arbitration" occur in this case. On the other hand, during the bus right hold operation, the bus access (R1) is carried out, and the signal HREQ# is continuously asserted according to the signal BHREQ# to continuously hold (not release) the bus right. In this case, only one time of "bus arbitration" will do. This may quicken the start of the bus access (R2). As a result, the intermittent bus access operations of the bus access source 12a may be carried out at high speed, thereby improving the performance of the second processing unit 12 and the overall processing performance of the system. If the bus right is continuously given to the second processing unit 12, the first processing unit 11 that shares the buses with the processing unit 12 cannot access the buses. In particular, if the first processing unit 11 is a main CPU, it must immediately access the memory 10 whenever needed, or the system as a whole will be shut down. Accordingly, the embodiment is so configured as to forcibly release the bus right held by the second processing unit 12 according to the signal BRL#. Figure 6 is a timing chart showing this operation. When a bus access request occurs with the signal BHREQ# being negated, the signal HREQ# is asserted (1). Accordingly, the bus right is secured. If the signal BRL# is asserted (2) at this moment, the signal HREQ# is negated, so that the bus right is released. If the bus request continues after the signal BRL# is negated (3), the signal HREQ# is asserted (4), so that the bus right is again acquired. On the other hand, with the signal BHREQ# being asserted, the signal HREQ# is continuously asserted (5) even if the bus request disappears, so that the bus right may be continuously secured. If the signal BRL# is asserted (6) during this period, the bus right is forcibly released. As a result, the bus right can be smoothly shifted from the second processing unit 12 to the first processing unit 11. As explained above, the embodiment asserts the signal HREQ# in response to a bus request of the bus request source 12a, and the bus request source 12a acquires the bus right to access the buses. When the signal BHREQ# is asserted, the signal HREQ# is continuously asserted, thereby minimizing the number of bus arbitrations. This may improve a bus access speed and the performance of the second processing unit 12. If the first processing unit 11 is busy, the signal BRL# is asserted, and the bus right of the second processing unit 12 is forcibly released, so that the first processing unit 11 may have the bus right. As shown in Fig. 7, the request signal generation means (b) and hold instruction means (d) may be simply realized by an R-S flip-flop. Namely, when the bus request source 12a provides a bus request, the R-S flip-flop is set, and when there is no bus request with the signal BHREQ# being negated, or when the signal BRL# is asserted, the R-S flip-flop is reset. According to the embodiment, the given processing unit generates the bus right hold request signal BHREQ# for holding the bus right. This signal may be produced by providing a busy signal (BUSY#) from the processor 12a of the given processing unit to the hold instruction means (d). The signal BHREQ# may be another logical signal. For example, it may be produced by grounding. In Fig. 8, the processor 12a accommodates the hold instruction means (d), and the processor's own busy signal is used to activate the hold instruction means (d). An example of a bus control method employing the bus controller according to the invention mentioned above will be explained with reference to Fig. 9. Figure 9 is a flowchart showing bus control processes carried out by the bus controller according to the invention mentioned above. After the flow starts, Step (1) analyzes an instruction, and Step (2) determines whether or not the instruction uses the buses. If the instruction does not use the buses, the flow returns to Step (1) to repeat the same process. If the instruction uses the buses, Step (3) activates the bus right request signal generation means (b) to generate the bus right request signal HREQ#. Step (4) determines whether or not the bus right acknowledge signal HACK# is returned from the bus right arbitration means (e) with the signal HREQ# being asserted. If the signal HACK# is not returned, Step (4) is repeated. If the signal HACK# is returned, Step (5) sets the processing unit in question as a bus master. Step (6) determines whether or not another processing unit is providing a bus right release request signal, i.e., the bus release signal BRL. If there is the signal BRL, Step (10) negates the signal HREQ#. When there is no signal BRL in Step (6), Step (7) determines whether or not the processing unit in question has processed all operands of the given instruction. If not, the flow returns to Step (6) to repeat the process. If the processing unit in question has completed the instruction, Step (8) determines whether or not the signal BHREQ# is asserted. If the signal BHREQ# is asserted, Step (9) keeps the signal HREQ# being asserted. If the signal BHREQ# is negated, Step (10) negates the signal HREQ#. According to the invention, the signal HREQ is kept asserted to reduce the bus access wait time. This may improve the performance of a bus request source that frequently accesses the main storage. Unlike the prior art, which requires a processing unit to provide a bus right request whenever an instruction to be processed by the processing unit demands data that must be fetched from a memory after the bus right request is asserted, or whenever a result of the processing of the instruction is stored in the memory, the invention can secure a bus right for the processing unit until all operands are processed in the processing unit and a result of the process is stored in the memory. This may improve the processing speed. Figure 10 is a block diagram showing the details of internal arrangements of first and second processing units 11 and 12 of a bus control system according to the invention. In Fig. 10, the first and second processing units 11 and 12 directly exchange a bus right request signal and a bus right release signal without using an arbiter (bus right arbitration means). The first processing unit 11 comprises an internal processor 11a, bus right request signal receive means 111, bus right release means 112 involving bus right assert means 113 and bus right negate means 114, and bus right acquisition means 115. The second processing unit 12 comprises an internal processor 12a, bus right request signal generation means 121 involving bus right assert means 122 and bus right negate means 123, bus right response signal receive means 124, bus right release signal receive means 125, and bus right hold signal receive means 126. Figure 11 shows a second processing unit 12, which exchanges a bus right request signal and a bus right release signal with a first processing unit 11 through an arbiter (bus right arbitration means). The second processing unit 12 comprises an internal processor 12a. The internal processor 12a includes a vector register, a scalar register, a mask register, and means for providing functions of ADD, MUL, DIV, MASK, and graphics, which are driven according to instructions provided by an instruction control unit 131. Signals HREQ, HACK, BHREQ, etc., are transferred through bus right control units 12d and 12b, which are connected to a bus control unit 133. The bus control unit 133 is also connected to a control bus C-BUS. Bus access means 12c comprises a control unit 134 and an address generation unit 135. The control unit 134 is connected to a data bus D-BUS and includes a means for providing functions of LOAD, STORE, etc.

Claims: A processing system having a plurality of processing means (11, 12, ..., 1n), a bus (A-, C-, D-Bus), and storage means (10) accessed by said plurality of processing means through the bus and a bus controller, characterized in that said processing means act as main processing means or sub processing means, each processing means having a control unit (S) including one or more functions of said bus controller which comprises : at least one bus right request signal generation means (12b) responsive to its respective sub processing means for providing a bus right request signal (HREQ#) to a main processing means of said system, bus right arbitration means (e) for arbitrating a bus right in response to a bus right request signal (HREQ#) from said main processing means and notifying said sub processing means of the result of the arbitration, bus access means (12c) for enabling said sub processing means to access the bus after receiving a bus right acquisition acknowledgment (HACK#) from said bus right arbitration means, hold instructions means (12d) for generating a hold signal (BHREQ#) for holding an acquired bus right until the time when said hold instruction means receives a bus right release signal (BRL#), which forces said sub processing means to release said bus right acquired from said main processing means, even after said sub processing means has finished a processing operation using said bus right, and bus right release signal generation means (f) for generating a release signal (BRL#) to release the bus right acquired by said sub processing means. A processing system according to claim 1, wherein the bus right arbitration means (e) is disposed in at least one of the processing means (11, 12, ... 1n). A processing system according to claim 2, wherein said at least one processing means (11, 12, ...1n) has (or have) the release signal generation means (f) and the other processing means has (or have) the bus right request signal generation means (12b), bus access means (12c), and hold instruction means (12d). A processing system according to claim 2 or 3, wherein said at least one processing means serve(s) as a main processing means (11) of the processing system. A processing system according to claim 1, wherein the bus right arbitration means (e) is disposed independently of a plurality of the processing means (11, 12, ..., 1n). A processing system according to claim 5, wherein one of the processing means (11) has the release signal generation means (f), and the other processing means (12) has (or have) the bus right request signal generation means (12b), bus access means (12c), and hold instruction means (12d). A processing system according to claim 6, wherein said one of the processing means (11) serves as a main processing means of the processing system. A bus controller comprising : a request signal generation means (12b) for generating a bus request signal (HREQ#) according to a request from a given bus request source; bus right arbitration means (e) for arbitrating a bus right in response to the bus request signal (HREQ#) and issuing the result of the arbitration; bus access means (12c) for accessing a bus (A-, D-, C-Bus) with the bus request source as a bus master after receiving the thus issued result; and hold instruction means (12d) for holding the request signal while a predetermined hold signal (BHREQ#) is being asserted by a bus hold signal so as to continue acquiring a bus right and a predetermined release signal (BRL#) is being negated. A bus controller according to claim 8, wherein, when the bus request source intermittently requests the bus right, the predetermined hold signal (BHREQ#) is asserted. A bus controller according to claim 8, wherein, when another bus request source that is different from the given bus request source but shares the bus (A-, D-, C-Bus) with the given bus request source is going to request the bus right to serve as a bus master while the given bus request source is holding the bus right, the predetermined release signal (BRL#) is asserted to release the bus right.

Inventors: IINO HIDEYUKI, TAKAHASHI HIROMASA, IINO, HIDEYUKI, TAKAHASHI, HIROMASA, IINO, HIDEYUKI, FUJITSU LIMITED, TAKAHASHI, HIROMASA, FUJITSU LIMITED
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G06F13
IPC codes: G06F13