A bus topology, like that shown in
Most buses 112 support multiple masters 110, although, again, only one master 110 can be active at a time. The master 110 competes for access to the bus 112, initiates a transaction, waits for a slave 114 (or in the case of a “broadcall” transaction, multiple slaves) to respond, and then relinquishes the bus 112. The master 110 may then initiate a second transaction or, through arbitration 116, lose control of the bus 112 to another master 110. This arrangement can lead to system bottlenecks where the waiting for access slows the system performance significantly.
In one embodiment of the disclosure, a method for performing synchronized transactions in a multi-master interconnect architecture having at least one shared resource is disclosed. The method comprises issuing a write non-posted transaction from a first master component to the interconnect for access to the at least one shared resource, and generating at the first master component an interrupt request for a second master component upon issuance of the write non-posted transaction for indication thereof. The method further comprises receiving a write acknowledgement upon completion of the issued write non-posted transaction, generating an enable signal upon receiving the write acknowledgement, and using the enable signal to pass the generated interrupt request to the second master component, thereby indicating completion of the write non-posted transaction of the first master component and thus avoiding a race condition.
According to another embodiment of the disclosure, a master component configured to operate within a multi-master interconnect architecture that utilizes at least one shared resource is disclosed. The master component comprises an issuance component configured to issue a write non-posted transaction for writing data to the at least one shared resource, and an interrupt request generation component configured to generate an interrupt request upon issuance of the write non-posted transaction. In addition, the master component comprises an enable component configured to pass the generated interrupt request to another master component of the multi-master interconnect architecture upon receipt of a write acknowledgement indicating a completion of the write non-posted transaction.
According to yet another embodiment of the disclosure, a shared resource system configured to operate within a multi-master interconnect architecture is disclosed. The shared resource system comprises a target interface configured to couple to an interconnect for receipt of transactions from a master component via the interconnect, and a shared resource component operably coupled to the target interface and configured to receive data or an instruction via the target interface associated with a received transaction. In addition, the shared resource system comprises a classification logic component operably associated with the target interface and configured to analyze a received transaction passing through the target interface and generate a transaction or an event in response thereto according to pre-defined classification rules.
In still another embodiment of the disclosure, a method of providing synchronization for transactions in a multi-master interconnect architecture having a shared resource is disclosed. The method comprises receiving a transaction at a target interface of the shared resource, wherein the target interface is configured to couple to an interconnect, analyzing the received transaction at the target interface, and generating a transaction or event in response to analyzing the received transaction, wherein the generated transaction or event is local to the shared resource.
The disclosure includes embodiments that apply to an interconnect architecture having multiple system masters and at least one shared resource. The disclosure provides a system and method for providing synchronization for transactions in a multi-master interconnect architecture that employs at least one shared resource, or slave component.
Multiple system masters perform synchronized read and write transactions towards shared resources and process shared data structures, which are stored in these shared resources. System masters may be CPUs, a direct memory access (DMA) controller or a peripheral component interconnect express (PCIe) controller, etc. Shared resources may be a DDR SDRAM or an on-chip SRAM. Shared data structures may be DMA descriptors, Ethernet frames etc. The shared resources may also be peripherals, such as a pulse-code modulation (PCM) peripheral, a PCIe peripheral, and a universal serial bus (USB) peripheral, for example. This kind of synchronization is mandatory in order to prevent a malfunction of the entire embedded system.
Typically the following synchronized and well defined sequence has to be observed in the traditional bus architecture of
The synchronization effort gets complicated, when moving from simple multi-master-multi-slave bus based interconnects, e.g., advanced micro-controller bus architecture high performance bus (AMBA AHB) to high performing Crossbar or Network on Chip (NoC) based interconnects. A bus based interconnect prevents per default race conditions, because read and write transactions issued by multiple system masters use the same and only one data path (the AMBA AHB bus) towards the target. Furthermore, the arbitration logic associated with the bus based interconnect omits Quality of Service (QoS) features, that is, the AMBA AHB bus neither re-orders nor buffers transactions etc.
Race conditions in the context of this disclosure are defined as incorrect sequences of read and write transactions towards the shared data structures. This effect is caused by the interconnect due to new quality of service (QoS) features.
A crossbar based interconnect architecture (which may be more generalized as a switch fabric), or network on chip (NoC) based interconnect architecture, may implement the following new QoS features: (1) transaction re-order capabilities, (2) extensive transaction buffering (read and write transaction) as well as the associated write data, (3) different latencies in the request and response path between an initiator and a target, which may be caused by different operating frequencies, data path width, arbitration schemes in the request and response path, and (4) NoC based interconnects may implement multiple paths from an initiator (system master) to a target (system slave). As a consequence, a system master has no knowledge, when its transaction reaches the target. This is especially a challenge in the case of posted-write transactions. Posted write means that the initiator does not get an acknowledgement when the write operation is completed, that is, when the shared data structure is updated in the shared resource like DDR SDRAM.
The first system master updates shared data structures located in DDR SDRAM, e.g., a DMA writes an Ethernet frame to the DDR SDRAM. The DMA performs a posted-write; thus while the DMA knows that the write transaction was sent to the interconnect, the DMA does not receive an acknowledge. Furthermore, the DMA also does not know when the write transaction has completed within the target (e.g., that the entire Ethernet frame and the associated DMA descriptor was fully written to the memory). The DMA sends an interrupt request to the second system master, e.g., the CPU immediately after sending the write transaction. The CPU, upon being informed by the DMA, immediately initiates a transaction towards the shared data structure, for example, the CPU performs a read transaction to the shared data structure. In case the transaction initiated by the CPU reaches the shared resources earlier than the transaction initiated by the DMA, the embedded system may malfunction. Note: This effect may be caused by the interconnect due to re-ordering, write buffering techniques driven by the interconnect QoS features, for example.
The above described sequence that can result in a system malfunction may be improved, if the first system master performs a “blocking” read transaction to the shared data structure, immediately after completing updating the shared data structure. In such a solution, the DMA waits for the read response to be returned, before an interrupt request is sent to the second system master. This approach eliminates the race condition. It synchronizes the system masters and preserves the order of the transaction initiated by the first and second system master. The drawback is the additional “blocking” read transaction, i.e., wasting bandwidth of the shared resource. Especially the DDR SDRAM is a bottleneck within an embedded system.
A solution according to one embodiment of the invention describes reliable and high performing systems and methods to synchronize read and write transactions as well as events (trigger, interrupt requests and messages) between multiple system masters. This is achieved by extending the functionality of the interconnects as described more fully below in conjunction with
In one embodiment the first master component 302 further comprise enable logic 316 as well as other components that collectively operate to ensure proper synchronization for read and write transactions and events between multiple master components. While in some instances transactions and events may differ, for purposes of this disclosure, the term transaction is used broadly to include both transactions and events. The first master component further comprises an issuance component (not shown) that operates to issue any write transaction as a write non-posted transaction. Thus when the first master component 302 wishes to issue a write transaction to the shared resource 312, the issuance component operates to ensure that the write transaction is a write non-posted transaction. As may be appreciated, upon completion of the write non-posted transaction at the shared resource 312, a write acknowledgement 318 is issued and transmitted back to the first master component 302.
Still referring to
In accordance with another embodiment of the disclosure, a method of performing synchronized read and write transactions in a multi-master interconnect architecture having at least one shared resource (e.g., such as that illustrated in
Therefore a system master is modified in accordance with one embodiment of the invention in order to issue write non-posted transactions. Each time the write non-posted transaction including the associated write data has reached the target, a write acknowledge is returned to the “first” system master. The “first” system master delays the interrupt request to the “second” system master e.g. CPU, until it has received the write acknowledge. This delay of the interrupt request is achieved in one embodiment with new “enable logic” as well as the “first” system master issuing write non-posted transactions. Note: Typically, a write non-posted transaction is performed for the last DMA descriptor update.
In accordance with another embodiment of the disclosure, the master components are not limited to a write non-posted type of transaction. In this embodiment, a classification logic is employed at the shared resource (i.e., the slave component). The classification logic analyses or evaluates those transactions from various master components that pass the respective target interface, and then selectively generates events and/or transactions according to pre-defined classification rules based on the analyzed transaction.
The classification logic is associated with a target interface of a shared resource in order to analyze the transactions, while they are passing the target, to be completed within the system slave. The classification logic may generate events and/or transactions according to pre-defined classification rules. For example, the first system master 302 (e.g., the DMA controller) updates the DMA descriptor in the shared resource 312, after the payload has been written to DDR SDRAM. The classification logic detects this DMA descriptor update and generates an event and/or transaction.
Referring still to
Still referring to
The interconnect 306 classifies transactions and generates events and/or transactions in a pre-defined and expected order. A classification logic 320 is placed beside each target interface of a shared resource, analyzes the type of transaction (read, write non-posted, posted write, bust, single etc.), the initiator of the transaction (which system master), the content and the target address of the transaction, etc.
Locating the classification logic 320 at the target interface of each shared resource ensures that a transaction is classified after reaching the target interface 314, i.e., the “initial” transaction has successfully completed. The interconnect 306 therefore can no longer affect the transaction at issue, e.g., re-order, delay, error terminate, etc. Furthermore, the shared resource 312, for example, system slave connected to the target interface 314 takes care that transactions from multiple system masters towards the same address or address range are executed by the system slave in the order in which they have arrived at the target interface 314.
The classification logic 320 generates “derived” events and/or transactions, according to pre-defined classification rules while analyzing the “initial” transaction passing by. “Derived” events may be interrupt requests, start/stop conditions, enable/disable conditions, etc. “Derived” transactions may be acknowledge messages, interrupt messages, or any other type of message transferred via the interconnect 306. The destination of a “derived” event or transaction may be the system master who initiated the “initial” transaction, as well as any other logic block within the embedded system. A “derived” event or transaction reaches the destination time wise after the “initial” transaction has passed the target interface 314 and, in most cases, has completed in the system slave.
“Derived” events or transactions cause “synchronized” actions in a system master, optionally in any other logic block. For example, a system master like a CPU initiates a transaction towards a system slave, accessing shared data structures. The order of transactions towards shared resources and shared data structures is preserved, due to the above described synchronization scheme.
In yet another embodiment of the invention, a method of providing synchronization for transactions in a multi-master interconnect architecture having at least one shared resource is disclosed in
In particular regard to the various functions performed by the above described components or structures (assemblies, devices, circuits, systems, etc.), the terms (including a reference to a “means”) used to describe such components are intended to correspond, unless otherwise indicated, to any component or structure which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations. In addition, while a particular feature may have been disclosed with respect to only one of several implementations, such feature may be combined with one or more other features of the other implementations as may be desired and advantageous for any given or particular application. Furthermore, to the extent that the terms “including”, “includes”, “having”, “has”, “with”, or variants thereof are used in either the detailed description and the claims, such terms are intended to be inclusive in a manner similar to the term “comprising”.
This application claims the benefit of U.S. Provisional Application No. 61/558,450, filed Nov. 11, 2011, which is incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61558450 | Nov 2011 | US |