For a conventional transaction process, a merge device is applied for merging transactions to increase the accessing efficiency or the transmission efficiency. A conventional merge device uses a fixed merging window to perform merging, thus causes fixed transaction latency. However, the electronic device which receives the merged transactions may have different bandwidth conditions. Also, different circuits or components may have different latency tolerances. Besides, different transactions may also have different latency tolerances. Accordingly, it is not suitable to use a fixed merging window while merging the transactions.
One objective of the present application is to provide a transaction merging method which can dynamically change a size of the merge window.
Another objective of the present application is to provide a transaction merging system which can dynamically change a size of the merge window.
One embodiment of the present application discloses a transaction merging method for a first electronic device and a second electronic device. The transaction merging method comprises: (a) receiving a plurality of input transactions from the first electronic device; (b) setting a merge condition of the input transactions according to a transmission condition between the first electronic device and the second electronic device; (c) merging the input transactions according to the merge condition to generate at least one transaction group; and (d) transmitting the transaction group to the second electronic device.
Another embodiment of the present application discloses a transaction merging system, comprising: a first communication interface, configured to receive a plurality of input transactions from the first electronic device; a merge device, configured to set a merge condition of the input transactions according to a transmission condition between the first electronic device and the second electronic device, and configured to merge the input transactions according to the merge condition to generate at least one transaction group; a second communication interface, configured to transmit the transaction group to a second electronic device.
In one embodiment, the input transactions respectively comprise at least one command, such as a write command or a read command. The first electronic device may be a master device and the second electronic device may be a slave device. In another embodiment, the first electronic device is a GPU and the second electronic device is a DRAM controller.
In view of above-mentioned embodiments, the merge condition can be dynamically changed corresponding to different transmission conditions, thus the issue caused by the fixed merge window of a conventional merge device can be improved.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In the following descriptions, several embodiments are provided to explain the concept of the present application. The term “first”, “second”, “third” in following descriptions are only for the purpose of distinguishing different one elements, and do not mean the sequence of the elements. For example, a first device and a second device only mean these devices can have the same structure but are different devices.
The merge device 103 is configured to set a merge condition of the input transactions T_I1, T_I2 according to a transmission condition between the first electronic device E_1 and the second electronic device E_2, and configured to merge the input transactions T_I1, T_I2 according to the merge condition to generate at least one transaction group (transaction groups T_G1, T_G2 are used as an example for explaining). The second communication interface 105 is configured to transmit the transaction groups T_G1, T_G2 to a second electronic device E_2. The second communication interface 105 can also receive data or response from the second electronic device E_2.
In one embodiment, the input transactions T_I1, T_I2 respectively comprises at least one command, such as a write command or a read command. In one embodiment, the first electronic device E_1 is a master device and the second electronic device E_2 is a slave device. In another embodiment, the first electronic device E_1 is a GPU (Graphic Processing Unit) and the second electronic device E_2 is a DRAM controller.
As above-mentioned, the merge device 103 is configured to set a merge condition of the input transactions T_I1, T_I2 according to a transmission condition between the first electronic device E_1 and the second electronic device E_2. In one embodiment, the merge condition is a size of a merge window of the input transactions T T_I2, and the transmission condition is a bandwidth condition of a target device which is controlled by the second electronic device E_2. For example, if the second electronic device E_2 is a controller (e.g., a DRAM controller) the transmission condition is a bandwidth condition of the target device (e.g., a DRAM) which is controlled by the controller.
In following embodiments, merge devices with different structures are provided as examples for explaining the concepts of the present application. For the convenience of illustration, the first communication interface 101 and the second communication interface 103 are not illustrated in following embodiments.
In the embodiment of
Besides, in the embodiment of
As shown in
In the embodiment of
Please refer to
After receiving the transaction groups I_G1, I_G2, the second electronic device E_2 acquires the transactions contained in the transaction groups I_G1, I_G2 and correspondingly generates responses corresponding to the transactions. Also, the second electronic device E_2 may read the data from the target electronic device or write data to the target electronic device corresponding to the transactions contained in the transaction groups I_G1, I_G2. In one embodiment, the merge device 103 and the second electronic device E_2 communicate via an AXI (Advanced extensible Interface), but not limited.
The merge device 103 may comprise other components corresponding to types of the first electronic device E_1 or the second electronic device E_2. In one embodiment, the first electronic device E_1 is a GPU and the second electronic device E_2 is a DRAM controller. In such case, the merge device 103 may comprise a FIFO array to collect transactions of an AR channel or an AW channel or collects data of a W channel. The FIFO array is further configured to record time stamps of the transactions or the data. The merge device 103 is configured to merge transactions, as shown in above-mentioned embodiments. The merge device 103 may further comprise a merge ID table for recording which transactions are merged. The data or responses from the second electronic device E_2 can be unpacked based on the merge ID table.
In the above-mentioned embodiments, the transmission condition is a bandwidth condition of the target device controlled by the second electronic device E_2. However, the transmission condition can be other information. In one embodiment, the transmission condition is a type of the input transactions, or a latency sensitivity level of the input transactions. Some types of input transactions may not be suitable for merging or hard to be merged. In such case, a merge window with a small size can be selected thus less input transactions are merged for each merge window. Also, each merge operation may cause latency for transmitting the transactions, thus the size of the merge window can be selected to a latency sensitivity level of the input transactions. For example, a merge window with a small size can be selected thus less input transactions are merged for each merge window, if the input transactions have a high latency sensitivity level. On the opposite, a merge window with a small size can be selected thus more merge operations can be performed, if the input transactions have a low latency sensitivity level.
In such case, the above-mentioned control signal CS is generated by the first electronic device E_1 as shown in
In the above-mentioned embodiments, one of the candidate merge windows is selected according to the available bandwidth, the latency sensitivity level of the input transaction or the type of the input transaction. However, in one embodiment, the above-mentioned merge condition is whether the input transactions are merged or not. In other words, the merge device 103 can be selectively bypassed.
The bypass of the merge device 103 is not limited to be controlled by the first electronic device E_1. In another embodiment, the merge device 103 is bypassed according to a control signal generated by the second electronic device E_2 (not illustrated). For example, the merge device 103 is bypassed if the available bandwidth of the target device controlled by the second electronic device E_2 is smaller than a bandwidth threshold. On the contrary, the merge device 103 is used to merge the input transactions T_I1, T_I2 (i.e., not bypassed) if the available bandwidth of the target device is larger than a bandwidth threshold. The embodiment illustrated in
In view of above-mentioned embodiments, a transaction merging method is acquired.
Step 701
Receive a plurality of input transactions (e.g., the input transactions T_I1, T_I2 in
Step 703
Merge the input transactions according to the merge condition to generate at least one transaction group (e.g., the transaction groups T_G1, T_G2 in
Step 705
Transmit the transaction group to the second electronic device (e.g., the second electronic device E_2 in
In one embodiment, the first electronic device E_1 is a GPU and the second electronic device E_2 is a DRAM controller for controlling a DRAM. The input transactions T_I1, T_I2 can be read commands or write commands for the DRAM. After receiving the input transactions T_I1, T_I2, the second electronic device E_2 may correspondingly transmits response or data to the first electronic device E_1.
Other detail steps can be acquired from the above-mentioned embodiments, thus are omitted for brevity here.
In view of above-mentioned embodiments, the merge condition can be dynamically changed corresponding to different transmission conditions, thus the issue caused by the fixed merge window of a conventional merge device can be improved.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
This application claims the benefit of U.S. Provisional Application No. 63/398,845, filed on Aug. 17, 2022. The content of the application is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
63398845 | Aug 2022 | US |