A method and apparatus for performing bus arbitration using an arbiter in a data processing system

Abstract: A data processing system (10) and method for performing bus arbitration protocol using an arbiter (14). The data processing system (10) has multiple bus masters (12, 16) each of which is coupled to multiple shared buses (20, 22,24, 28). The arbiter (14) detects a bus request from a requesting bus master, and responds with a bus grant to notify the requesting bus master that the arbiter has selected the requesting bus master to be a bus-master elect for a shared bus (20). The requesting bus master monitors a shared signal line to determine when a current bus master has released ownership of the shared bus (20). When the requesting bus master assumes ownership of the shared bus it deactivates the bus request signal for a clock period after commencement of the bus transaction, which allows the arbiter (14) to select a next bus master-elect, thereby preventing any bus master from monopolizing the shared bus (20).

Description: FIELD OF THE INVENTION This invention relates generally to data processing systems, and more particularly to data processing systems which perform bus arbitration. BACKGROUND OF THE INVENTION Today's high performance data processor with on-chip caches or pipelined input/output (I/O) units (e.g. instruction sequencers, load/store units) has the potential to generate multiple independent internal requests for access to an external memory system. Due to packaging pin count limitations, all of these data processor resources must access external memory via a single bus interface unit (BIU). Since multiple independent internal requests may appear at the BIU at any given time, the data processor requires an internal bus arbitration scheme to determine which of the internal requests is selected to access the system bus. In multi-master systems, where one or more of the data processors has the capability of becoming bus master, the bus arbitration protocol determines which data processor(s) becomes the bus master. Typically, these multi-systems employ an arbitration protocol in which an external arbiter controls bus arbitration, and each data processor requests access to the shared external memory, from the arbiter, using bus arbitration signals. For example, in a centralized, three-wire arbitration protocol, the three main control signals used by the data processor are a bus request (BR*) output, a bus grant (BG*) input, and a bus busy (ABB*) input/output (where "*" denotes an active low signal). The arbitration protocol allows arbitration to be overlapped with bus activity. Accordingly, requests from potential bus masters via their respective BR* signals may overlap with a current bus transaction, with the transfer of bus ownership (bus hand-off) being controlled by the external arbiter providing the (BG*) signal and the current bus master providing the ABB* signal. Thus, a first data processor requests the bus from the arbiter by asserting their BR* signal, whenever an internal bus request is pending. The first data processor continues to assert the BR* signal until the arbiter indicates (via the BG* signal) that the arbiter has selected the data processor as the next bus master, and the first data processor determines that the address bus is not busy. Accordingly, once the arbiter asserts the BG* signal of the first data processor, the first data processor monitors the bus busy (ABB*) signal to determine when the bus cycle of the previous (alternate) master has been completed. After the ABB* signal is negated by the alternate master, the first data processor asserts the ABB* signal to indicate ownership of the bus and begins the bus cycle. After the bus cycle starts, the first data processor continues to assert BR* if another internal bus request is pending, or negates the BR* signal if no further accesses are required. Thus, a data processor using this arbitration protocol along with an on-chip Harvard architecture may generate independent and overlapping internal requests for external bus access. An internal bus request could be generated simultaneously from the instruction side and the load/store side. Alternatively, an internal request could come from the load/store side while the instruction side is already the external bus owner and is performing an external bus instruction fetch, or vice versa. In either case, it is desirable to issue the pending internal request to the external arbiter as early as possible to take advantage of the arbitration overlap with the current bus master. Generally, multi-master systems depend on some sort of "Fairness" arbitration protocol to prevent any one bus master from monopolizing the external bus. A typical Fairness protocol would limit each bus master to one bus transaction when the arbiter receives requests from multiple potential bus masters. Essentially, the arbiter would allow each master a turn in round-robin fashion. It is desirable, however, to allow certain bus transactions (e.g. read-modify write) to execute indivisibly. Since the data processor has multiple independently generated internal bus requests, in some instances the data processor's external bus request (BR*) signal will be held asserted continuously. Consequently, a Fairness external arbiter may be forced to monitor other control signals from the external bus, in addition to the BR* signal, in order to insure that certain bus transactions execute indivisibly. Due to logic complexity and pin count limitations, implementation of such a Fairness arbiter is difficult and problematic. SUMMARY OF THE INVENTION In accordance with a first aspect of the invention there is provided a method for implementing a bus arbitration protocol as claimed in claim 1. In accordance with a second aspect of the invention there is provided a data processing system for performing bus arbitration as claimed in claim 3. The present invention will be understood by one skilled in the art from the detailed description below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 illustrates, in block diagram form, a data processing system for performing bus arbitration, in accordance with the present invention. FIG. 2 illustrates, in timing diagram form, a bus arbitration protocol associated with the system of FIG. 1 and incorporating a fairness oriented bus request mechanism, in accordance with the present invention. DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT The terms "assert" and "assertion" are used when referring to the rendering of a signal or similar apparatus into its logically true (active) state, whereas, "negate" and "negation" are used when the signal or other apparatus is rendered into its logically false (inactive) state. The asterisk symbol will be used to indicate a complemented signal. For example, BUS REQUEST* indicates a signal that is the complementary logic state of the BUS REQUEST signal. Illustrated in FIG. 1 is a preferred embodiment of a multi-master data processing system 10 which uses a centralized arbitration system that simplifies the implementation of a fairness protocol, in accordance with the present invention. In the illustrated form, an address bus 20, data bus 22, and the transfer control signal lines 24 are coupled to, and shared by, a data processor (DP) 12 and other bus masters, herein singularly represented by alternate bus master (ABM) 16, to access an external memory system 18. The transfer control signals provide the basic handshake between the bus masters (data processor 12 and alternate bus master 16) and memory system 18. As illustrated in FIG. 1, an arbiter 14 is coupled to the data processor 12 and the alternate bus master 16 to control the allocation of ownership of the shared address bus 20. A reference clock generator 11 provides a clock (CLK) signal to the bus masters (data processor 12 and alternate bus master 16), the arbiter 14, and the memory system 18. In system 10, data processor 12 uses an internal Harvard architecture wherein an instruction sequencer (not shown) in a CPU core 30 fetches instructions from an instruction cache memory management unit (CODE CACHE) 32, and a load/store unit (not shown) in the CPU core 30 performs data reads/writes to a data cache memory management unit (DATA CACHE) 34. Both the CODE CACHE 32 and the DATA CACHE 34 generate internal bus request signals which are used to notify a Bus Interface Unit (BIU) 36 when an external memory access is required. Traditionally, data processing systems implement tenured or connected bus interfaces, whereby the data processor retains ownership over both the address and data bus until the transaction is terminated. In accordance with the present invention, system 10 uses a fairness arbitration protocol whereby the arbiter 14 is capable of controlling the allocation of the address bus 20 to the requesting masters. In a preferred embodiment of the present invention, system 10 employs multiple bus masters but does not support split bus transactions. Consequently, the data bus 22 can be continuously granted to the bus masters and arbitration is only required for address bus 20 mastership. Each potential bus master (data processor 12 or alternate bus master 16) has an independent bus request output signal, BR 1 * and BR 2 *, respectively, and an independent bus grant input signal, BG 1 * and BG 2 *, respectively, which are used to preform address bus arbitration. In a preferred embodiment an address bus busy (ABB*) signal line is shared by the bus masters, via an arbitration bus 28. Accordingly, the bi-directional ABB* signal is asserted by the current address bus master to indicate that potential bus masters must wait to take ownership of the address bus 20. In accordance with the present invention, a potential bus master asserts its bus request signal to request address bus 20 mastership. The bus grant signal is used by the external arbiter 14 to grant address bus 20 mastership in response to a bus request. Accordingly, the arbiter 14 looks at the BR* signals from each of the multiple potential bus masters (i.e. data processor 12, alternate bus master 16) and uniquely asserts the BG* input signal of one of the masters. The master whose BG* input signal is asserted by arbiter 14 is referred to as the "master-elect". The master-elect must wait until any current bus master releases address bus 20 ownership before taking control. As previously indicated, a current bus master indicates ownership of the address bus 20 by asserting ABB*. Upon completion of the bus transaction, the current bus master negates and releases the ABB* signal during a single clock bus hand-off. The master-elect only assumes address bus 20 ownership if its BG* signal is asserted and the ABB* signal is negated indicating the address bus 20 is not busy. Accordingly, potential bus masters use the ABB* signal to "qualify" the BG* input signal. Thus, ABB* is an output signal from the current bus master, and an input to all potential bus masters. Illustrated in FIG. 2 is a timing diagram 40 illustrating the one example of the operation of a fairness bus arbitration protocol in accordance with the present invention. In FIG. 2, the shaded portion of the signal indicates a "don't care" condition. Prior to beginning a bus transaction (CLK0), a potential bus master must request ownership of the address bus 20 from the arbiter 14, bus arbitration may begin before the current master completes its bus tenure. Accordingly, on the rising edge of the first clock period (CLK1), the arbiter 14 sees the BR 1 * asserted by data processor 12, and responds by asserting the BG 1 * signal. On the rising edge of the second clock period (CLK2), a current bus master releases the address bus 20 by negating the ABB* signal. Data processor 12 detects the assertion of the BG 1 * signal and the negation of the ABB* signal, and thereby determines that a qualified bus grant has been received. With the exception of an indivisible bus transaction (i.e. Read-Modify-Write), a bus master will always negate its bus request signal for a single ("dead") clock period, at the beginning of the bus transaction, after receiving the qualified bus grant. Accordingly, as illustrated in FIG. 2, upon receiving the qualified bus grant, data processor 12 drives the address (e.g. A31:A0) for the requested bus access onto the address bus 20, via bus 21, and negates the BR 1 * signal. The single clock negation of the BR 1 * signal by data processor 12, allows the arbiter 14 to "fairly" negate the bus grant signal (BG 1 *) for data processor 12 and select a new master-elect. The data processor 12 also asserts the transfer start (TS*) signal for one clock to indicate that a valid address and attributes are present on the address bus 20. On the rising edge of the third clock period (CLK3), the arbiter 14 detects the negation of the BR 1 * signal and the assertion of the BR 2 * signal by alternate bus master 16, and the arbiter 14 responds by negating the BG 1 * signal and asserting the BG 2 * signal. By asserting the BG 2 * signal, the arbiter 14 selects alternate bus master 16 to become the new master-elect. As illustrated in FIG. 2, on the rising edge of the fourth clock period (CLK4), data processor 12 completes its bus tenure, by negating and releasing the ABB* signal during a one-clock bus hand-off. On the rising edge of the fifth clock period (CLK5), alternate bus master 16 detects the assertion of the BG 2 * signal and the negation of the ABB* signal, and thereby determines that a qualified bus grant has been received. In response to detecting the qualified bus grant, alternate bus master 16 asserts the ABB* signal, starts the bus transfer, and negates the BR 2 * signal for a single "dead" clock period, assuming that the requested bus transaction is divisible. Under certain circumstances, the current bus master may require multiple transfers that are functionally related. For example, in the case of a Read-Modify-Write cycle, the current master (data processor 12) will continue to assert the BR 1 * signal throughout the first locked transaction (the read). Since the external arbiter 14 does not see the BR 1 * dead clock, as illustrated in FIG. 2, the arbiter 14 does not remove the BG 1 * signal, therefore, no master-elect is selected during the read portion (first half) of the operation. During the second half (write portion) of the operation, the BR 1 * negation clock is present, therefore, the arbiter 14 will assert the bus grant (e.g. BG 2 *) signal for the new master-elect. Consequently, when data processor 12 (current master) releases the address bus by negating the ABB* signal, the alternate bus master 16 (master-elect) will take ownership of the address bus 20. This operation guarantees the indivisibility of the Read-Modify-Write operation. In data processing systems using a shared bus, bus bandwidth is at a premium, therefore, these systems often use a split-transaction or pipelined memory bus to maximize bus throughput. In a split system, address and transfer attributes are latched locally at the appropriate memory module on the bus. The bus master then releases the address bus to allow another master to initiate a transaction. In the case of read operations, the memory system then routes the data back to the appropriate master. Whereas, for write transactions, the data is either latched along with the address, or the data transfer is postponed until the memory system is ready to be written . In an alternate embodiment of the present invention, system 10 has separate arbitration for the address and data buses, the allocation of which may be split, to enable a pipelined bus transaction or split-transaction bus. The fairness arbitration protocol of the present invention may be used in data processing systems which employ a split-transaction bus. Accordingly, in the alternate embodiment, data processor 12 and alternate bus master 16 must arbitrate for mastership of both the address bus 20 and the data bus 22 separately. In the alternate embodiment, split transactions require the use of a separate data bus grant (DBG*) input signal which is an input into each bus master, and a data bus busy (DBB*) signal line. Accordingly, the bi-directional DBB* signal is shared by the bus masters, via the arbitration bus 28. Referring again to FIG. 1, the memory system 18 would assert the DBG* signal to control the data bus hand-off between the current master and the master-elect, in the manner described above. The master-elect would then wait until it received a non-busy data bus indication (i.e. negation of DBB*) along with an asserted DBG* (denoted herein as a "qualified data bus grant"). After receiving the qualified data bus grant, the master-elect would assert the DBB* signal, thereby taking ownership of the data bus, and begin transferring data. Accordingly, in accordance with an alternate embodiment of the present invention, the arbiter 14 implicitly controls allocation of the data bus 22. As previously described, whenever a requesting bus master (i.e. data processor 12) asserts its bus request signal (BR 1 *), the requesting bus master is arbitrating for ownership of the address bus 20. Upon acquiring ownership of the address bus 20, data processor 12 asserts the TS* signal indicating that a valid address is present on the address bus 20. Essentially, the TS* signal functions as an implicit one-clock data bus request signal. Once the data is ready for transfer, the memory system 18 asserts the DBG* signal. Thus, the memory system 18 directly controls data bus 22 ownership, and the arbiter 14 directly controls the address bus 20 ownership. Thus, in accordance with the present invention, the bus interface protocol of data processing system 10 requires certain arbitration control signals (i.e. ABB*, DBB*) to be shared between the bus masters (data processor 12 and alternate bus master 16), via common bus signal lines which collectively comprise the arbitration bus 28 (FIG. 1). A shared output bus buffer (not shown) allows each of the bus masters, data processor 12 and alternate bus master 16, to drive the common bus signal line (e.g. ABB*) without bus contention. In a preferred embodiment, each bus master data processor 12 and alternate bus master 16 includes special output buffers designed to actively negate the shared signal before placing the buffer into the high impedance state. For example, the active low ABB* signal may be asserted by the current master (e.g. data processor 12) to indicate address bus ownership. When the data processor 12 relinquishes bus ownership, it places the ABB* output driver in the high impedance state allowing an external pull-up resistor to negate the ABB* signal so another master may assume ownership. Essentially, the external pull-up resistor functions as a "keeper" to maintain the shared signal as negated in the absence of a bus master. Thus, in accordance with the present invention, the data processing system 10 employs the arbiter 16 in a manner which insures that each of the multiple bus masters (data processor 12 and alternate bus master 16) are fairly given access to the shared address and data buses, 20 and 22, respectively. The negation by the current bus master (e.g. data processor 12) of their independent bus request signal (BR 1 *) for a signal "dead" clock period, enables the arbiter 16 to "fairly" select a new bus master-elect (i.e. alternate bus master 16) to assume ownership of the shared address bus 20, upon completion of the current bus transaction by the current bus master. Since the independent bus request signal (i.e. BR 1 *) is negated for the single "dead" clock cycle, the arbiter 14 is free to assert a new independent bus grant signal (i.e. BG 2 *) for the new bus master-elect. The new bus master-elect then monitors a shared signal line (ABB*) to determine when the current bus master has released ownership of the shared bus. Similarly, the new bus master-elect (alternate bus master 16) assumes ownership of the shared address bus 20 and deactivates the independent bus request signal (BR 2 *) for a clock period after commencement of the bus transaction, which allows the arbiter 14 to select yet another bus master-elect. Accordingly, the present invention preventing any bus master from monopolizing a shared bus. While the present invention has been described in accordance with a preferred embodiment, it should be apparent to one of ordinary skill in the art that the invention may be practiced in numerous ways. For example, in the illustrated form, arbiter 14 is a synchronous state machine which responds to transitions of the bus request signals on a rising clock edge. It would be apparent to one of ordinary skill in the art that arbiter 14 could be implemented asynchronously, assuming the arbiter logic was fast enough to accommodate the timing requirements (e.g. one clock arbitration) of system 10. Accordingly, it is intended by the appended claims to cover all modifications of the invention which fall within the scope of the invention.

Claims: In a data processing system (10) having a predetermined number of bus masters (12, 16, 17) each of which is coupled to a shared address bus (20), data bus (22), and arbitration bus (28), a method for implementing a bus arbitration protocol using an arbiter (14), coupled to each of said predetermined number of bus masters (12, 16, 17), to control allocation of bus ownership, said method comprising the steps of: detecting activation, by a first requesting bus master (16), of a bus request signal to arbitrate for ownership of a first shared bus, which can be said address bus (20) or said data bus (22), and providing, via said arbiter (14), a bus grant signal in response thereto, said bus grant signal notifying said first requesting bus master (16) that said arbiter (14) has selected said first requesting bus master (16) as a first bus master-elect; detecting, via said first requesting bus master (16), deactivation by a current bus master (12) of a bus busy signal, said bus busy signal being a bi-directional signal shared by each of said predetermined number of bus masters via said shared arbitration bus (28), and said deactivation of said bus busy signal by said current bus master (12) notifying said first requesting bus master (16) that said current bus master (12) has released ownership of said first shared bus and that said first requesting bus master (16) may assume ownership of said first shared bus; and deactivating, via said first requesting bus master (16), said bus request signal for a predetermined clock period after detecting said deactivation of said bus busy signal, if said first requesting bus master (16) does not require execution of multiple bus transfers that are functionally related, to allow said arbiter (14) to select a new bus master-elect by deactivating said first bus grant signal and activating a second bus grant signal during said predetermined clock period, said first requesting bus master (16) thereafter assuming ownership of said first shared bus; if said first requesting bus master (16) requires execution of multiple bus transfers that are functionally related, said first requesting bus master (16) does not deactivate said bus request signal for said predetermined clock period after assuming ownership of said first shared bus. The method of claim 1 further comprising the steps of: transferring address information from said first requesting bus master (16) onto said first shared bus while said first requesting bus master (16) is deactivating said bus request signal, if said first shared bus is an address bus (20); transferring data information from said first requesting bus master (16) onto said first shared bus, while said first requesting bus master (16) is deactivating said bus request signal, if said first shared bus is a data bus (22); and reactivating, via said first requesting bus master (16), said first bus request signal and said bus busy to thereby indicate that said first requesting bus master (16) is a new current bus master of said first shared bus, said first requesting bus master (16) maintaining activation of said bus request signal until said bus transaction is complete. A data processing system (10) having a predetermined number of bus masters (12, 16, 17) coupled to shared address bus (20), data bus (22) and arbitration bus (28) for performing bus arbitration to control allocation of bus ownership for a first shared bus which can be the address bus (20) or the data bus (22), said data processing system comprising: an arbiter (14) having a plurality of inputs capable of detecting activation of independent bus request signals by bus masters requesting a bus transaction on a first shared bus, and having a plurality of outputs for selectively providing a bus grant signal to notify a requesting bus master that said arbiter (14) has selected said requesting bus master as a first bus master-elect; first bus master (12) coupled to said arbiter (14) and each of said shared buses (20, 22, 28), said first bus master (12) initially being selected by said arbiter (14) as a current bus master of said first shared bus, said first bus master deactivating a bus busy signal to notify said requesting bus master that said first bus master (12) has released ownership of said first shared bus and said requesting bus master may assume ownership of said first shared bus, said bus busy signal being a bi-directional signal shared by requesting bus masters via said arbitration bus (28); and second bus master (16) coupled to said arbiter (14) and each of said shared buses (20, 22, 28), said second bus master (16) becoming said requesting bus master by activating a first independent bus request signal, said second bus master (16) receiving a first bus grant signal from said arbiter (14) and deactivating said first independent bus request signal for a predetermined clock period after detecting deactivation of said bus busy signal by said first bus master (12), if said second bus master (16) does not require execution of multiple bus transfers that are functionally related, to allow said arbiter (14) to select a new bus master-elect by deactivating said first bus grant signal and activating a second bus grant signal during said predetermined clock period if said second bus master (16) requires execution of multiple bus transfers that are functionally related, said second bus master (16) does not deactivate said first independent bus request signal for said predetermined clock period after said assuming ownership of said first shared bus. The data processing system (10) of claim 3 further comprising a shared memory system (18) coupled to said first (12) and second bus master (16) via said shared buses (20, 22, 28). The data processing system (10) of claim 3 where said arbiter (14) comprises means for detecting activation of said first independent bus request signal by said second bus master (16), and for activating said first bus grant signal, in response thereto, said arbiter maintaining activation of said first bus grant signal until said first independent bus request signal is deactivated by said second bus master (16) during said predetermined clock period, during which time said arbiter selects said new bus master-elect, by deactivating said first bus grant signal and activating a second bus grant signal, in response to detecting activation of a second independent bus request signal by said next bus master. The data processing system (10) of claim 3 wherein said first bus master (12) comprises processing means which activate said bus busy signal to thereby indicate ownership of said first shared bus, and deactivate said bus busy signal to thereby indicate that said first shared bus is available for use by said next bus master.

Inventors: GARCIA MICHAEL J, GULLETTE JAMES B, MOYER WILLIAM C, GARCIA, MICHAEL J., GULLETTE, JAMES B., MOYER, WILLIAM C.
Applicants: MOTOROLA INC, MOTOROLA, INC.
Application year: 1993
Main classification: G06F13
IPC codes: G06F13