Multi-master bus system performing atomic transactions and method of operating same6189061Abstract A multi-master bus system (10) comprises bus (12), a plurality of bus devices (14, 16, 18, 20, 22, 24), coupled to the bus, including masters (14, 16, 18), and slaves (20, 22, 24), a memory controller (26) for controlling the data exchange on bus (12), having a memory (36) for storing a transaction type value with respect to each slave (20, 22, 24). The multi-master bus system (10) comprises further an arbiter (30) for performing bus arbitration, arbiter (30) having logic for conditionally subsequently granting the bus (12) to a master of an initiating transaction for a closing transaction depending on the transaction type value of the slave of the initiating transaction. The multi-master bus system makes atomic or indivisible transactions possible on a bus without changing the bus width or the bus protocol. Claims What is claimed is: Description FIELD OF THE INVENTION
Transaction Type Transaction Type Value
Normal operation 00
Read after write atomicity 01
Write after read atomicity 10
Reserved 11
Three transaction type values are defined for the three types of transactions normal operation, read after write atomicity, and write after read atomicity. In this example, no slave needs read after write atomicity and also write after read atomicity, thus the fourth transaction type value is not related to such a transaction type but is reserved. Multi-master bus system 10 works as follows. Usually, several masters have to perform data transfer tasks at the same time. Therefore, such masters 14, 16, 18 compete for the bus by sending bus request signals to arbiter 32 on arbitration lines 40. Arbiter 32 has logic for granting the bus to a master who wins the arbitration according to an arbitration scheme which considers a hierarchical order of the masters. This master becomes the actual bus master who has sole access to bus 12 for a defined number of bus clock cycles. Memory controller 26 controls the data transfer on the bus as follows. Bus 12 is granted to an actual bus master, one of the masters 14, 16, 18. This actual bus master provides address and address attribute signals on bus 12 specifying an actual data transaction to be performed. Memory controller 26 reads these address and address attribute signals, identifies the address and associates one of the memory devices, slaves 20, 22, 24, as an actual slave, with which the respective data is to be transferred, and whether the actual data transaction is a read or a write. Then, memory controller 26 provides memory control signals on memory control lines 30 in order to perform the desired data transfer. Thereby, memory controller 26 takes care of the correct timing of any bus actions of the actual slave. Additionally, memory controller 26 compares the actual data transaction with the transaction type of the actual slave, using the transaction type values stored in the banks of its memory 38. If the transaction type of the actual slave is normal operation, or is the closing or finalizing transaction of an atomic transaction, then memory controller 26 provides a signal encoding "no atomic request", e.g. "low" on atomic request line 34. If the transaction type of the actual slave is the initiating or beginning transaction of an atomic transaction, then memory controller 26 provides a signal encoding "atomic request", e.g. "high" on atomic request line 34. Bus 12 is granted to the actual bus master only for one initiating bus transaction, i.e. for a defined number of bus clock cycles. The actual bus master becomes a normal bus master with respect to an arbitration for a next bus transaction. The arbitration for a next bus transaction happens during the initiating bus transaction such that it is complete before the next bus transaction and the bus is used efficiently. In the case of normal operation, which is indicated by the signal encoding "no atomic request", e.g. "low" on atomic request line 34, arbiter 32 receives bus request signals from masters, e.g. 14, 16, 18 competing for bus 12 for the next bus transaction. Arbiter 32 grants the bus to a master who wins the arbitration according to an arbitration scheme which considers a normal hierarchical order of the masters. This master becomes the actual bus master who has sole access to bus 12 for a defined number of bus clock cycles. In the case of an atomic operation, which is indicated by the signal encoding "atomic request", e.g. "high" on atomic request line 34, arbiter 32 receives bus request signals from masters, e.g. 14, 16, 18, at least including the master of the initiating transaction, competing for bus 12 for the next bus transaction. Arbiter 32 grants the bus to the master of the initiating transaction who becomes/stays the actual bus master and has sole access to bus 12 for a defined number of bus clock cycles. Thus, multi-master bus system 10 comprises bus 12, a plurality of bus devices 14, 16, 18, 20, 22, 24, coupled to the bus, including masters 14, 16, 18 having logic for requesting bus 12 and for initiating an initiating transaction upon being granted the bus, and slaves 20, 22, 24, memory controller 26 coupled to bus 12 for controlling the data exchange between bus devices 14, 16, 18, 20, 22, 24, memory controller 26 having memory 36 for storing a transaction type value with respect to each slave 20, 22, 24. Multi-master bus system 10 comprises further arbiter 30 coupled to bus masters 14, 16, 18 and memory controller 26 for performing bus arbitration, arbiter 30 having logic for conditionally subsequently granting bus 12 to the master of the initiating transaction for a closing transaction depending on the transaction type value of the slave of the initiating transaction. Multi-master bus system 10 makes atomic transactions possible on a bus without changing the bus width or the bus protocol. Thus, well known bus systems can be used in new electronics designs which can include memory devices that need atomic transactions. Granting the bus to the master of the initiating transaction by arbiter 32 can be achieved in several ways. A preferred possibility according to the invention is that the bus request signals from all other masters, e.g. 14, 16, 18, than the actual bus master are masked. Thus, only the actual bus master enters the arbitration process and thus wins bus 12 for a subsequent bus transaction. Another preferred possibility according to the invention is that the actual bus master is given a higher hierarchical order than all other masters just for the current arbitration process. Thus, the actual bus master wins bus 12 for a subsequent bus transaction. Still another preferred possibility according to the invention is that the arbitration process is blocked and the result of the previous arbitration process is repeated. Thus, the actual bus master is granted the bus 12 for a subsequent bus transaction. Preferably, memory controller 26 removes the signal encoding "atomic requests" e.g. "high" from atomic request line 34 after a predefined time has elapsed, and sends an interrupt signal to system's main processor 18 via interrupt line 32. This prevents that bus 12 hangs because of an uncompleted atomic transaction. Advantageously, the transaction type value with respect to a slave is changeable. This allows an application specific use of slaves 20, 22, 24. A method of operating bus 12 comprises the steps of defining a transaction type with respect to each slave 20, 22, 24; arbitrating of bus 12 by arbiter 30; granting bus 12 to an initiating master if the initiating master wins the arbitration; performing an initiating transaction by the initiating master on bus 12; if the transaction type is of a predetermined type, granting bus 12 subsequently to the initiating master for performing a closing transaction by the initiating master on bus 12. The transaction type and therefore the associated atomicity is determined by each slave 20, 22, 24 and thus defined with respect to each slave. During the operation of bus 12, arbitrating of bus 12 is performed by arbiter 30, which grants bus 12 to an initiating master who wins the arbitration. The initiating master performs an initiating transaction on bus 12. Now, if the transaction type is of a predetermined type, i.e. an atomic transaction, bus 12 is granted subsequently to the initiating master for performing a closing transaction by the initiating master on bus 12. Preferably, the method comprises, when the transaction type is of the predetermined type, the step masking bus request signals from other masters than the initiating master at least until bus 12 is granted to the initiating master for the closing transaction. Preferably, the method comprises, when the transaction type is of the predetermined type, the step increasing a priority of the initiating master while arbiting the bus for the closing transaction. Preferably, the method comprises, when the transaction type is of the predetermined type, the step blocking the arbitration process and repeating the result of the previous arbitration process at least until the bus is granted to the initiating master for the closing transaction. Preferably the transaction type of each slave is stored in a memory, which is advantageously within memory controller 26. Preferably, the method comprises, when the transaction type is of the predetermined type, the step releasing the bus and sending an interrupt signal to a processor after elapsing of a predetermined time. Those of skill in the art will understand based on the description herein that the invention is applicable with respect to semaphores. Those of skill in the art will know that the invention is also applicable to buses whereon addresses and data are multiplexed. It is not the typical application but still within the scope of this invention, that devices can act as master or slave for different transactions, thus being a master acting as a slave, when involved in a transaction initiated by another master. In the foregoing detailed description of the preferred embodiment, reference is made to the accompanying drawing which forms a part hereof, and in which is shown by way of illustration specific embodiments in which the invention can be practiced. These embodiments have been described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments can be utilized and that logical, mechanical and electrical changes can be made without departing from the spirit and scope of the present invention. The foregoing detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present inventions is defined only by the appended claims.
|
Same subclass Same class Consider this |
||||||||||
