An embodiment of the disclosure relates to the field of data transmission, in particular to a data transmission method and a data transmission device, for solving the problems of low data transmission efficiency and poor Direct Memory Access (DMA) performance in a method of arbitrating each DMA channel in a round-robin mode and transmitting data according to an arbitration result. The method in the embodiment of the disclosure includes that: for each DMA channel, an arbitration unit corresponding to the channel among a plurality of arbitration units is determined according to transmission performance corresponding to data in the channel; and when data in channels corresponding to at least two arbitration units need to be transmitted, the data are transmitted according to priorities of the at least two arbitration units. The embodiment of the disclosure first transmits data corresponding to a channel with good transmission performance corresponding to the data in the channel, and keeps a bus unblocked, thus improving data transmission efficiency and improving DMA performance.
Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A data transmission method, comprising: for a Direct Memory Access (DMA) channel, receiving, by an arbitration unit, a DMA request through the DMA channel from a hardware component to perform data transmission, determining an arbitration unit corresponding to the channel among a plurality of arbitration units according to transmission performance corresponding to data in the channel; when determining that data in channels corresponding to at least two arbitration units need to be transmitted, judging which data is to be transmitted firstly according to priorities of the at least two arbitration units; and sending, by the arbitration units, a command of data transmission to a bus command generator according to priorities of the arbitration units to perform data transmission by a bus controller; wherein the determining that data in channels corresponding to at least two arbitration units need to be transmitted comprises: after receiving data transmission commands corresponding to the at least two arbitration units within a set period of time, determining that the data in the channels corresponding to the at least two arbitration units need to be transmitted, wherein the data transmission commands corresponding to the arbitration units are different; wherein the data transmission command comprises: a source address, a target address and a data identifier; the data transmission commands corresponding to the arbitration units are different in one or more of the followings: source addresses in the data transmission commands corresponding to the arbitration units are different; target addresses in the data transmission commands corresponding to the arbitration units are different; and data identifiers in the data transmission commands corresponding to the arbitration units are different.
A data transmission method arbitrates Direct Memory Access (DMA) requests from hardware components. For each DMA channel, the method selects one arbitration unit from multiple available units based on the expected data transmission performance of that channel. When multiple arbitration units simultaneously request data transmission, the method prioritizes them according to a pre-defined order. The selected arbitration unit then sends a data transmission command (containing source address, target address, and data identifier) to a bus command generator, which in turn instructs a bus controller to perform the data transfer. Data transmission commands are considered different if their source addresses, target addresses, or data identifiers differ. Arbitration occurs when multiple different data transmission commands are received within a set period.
2. The method according to claim 1 , wherein the transmission performance corresponding to the data in the channel is a transmission time of the data corresponding to the channel or a transmission rate of the data corresponding to the channel.
The data transmission method described above (where data transmission requests are arbitrated based on channel performance and unit priority) determines the channel's transmission performance based on either the transmission time of the data in that channel or the transmission rate of the data in that channel. This means that the system uses either how long it takes to transmit the data or the speed at which the data is transmitted to determine which arbitration unit should handle the DMA request.
3. The method according to claim 2 , wherein when the transmission performance corresponding to the data in the channel is the transmission rate of the data corresponding to the channel, determining the transmission performance corresponding to the data in the channel comprises: determining the transmission time and a transmission capacity of the data corresponding to the channel; determining the transmission performance corresponding to the data in the channel according to the transmission time and the transmission capacity.
In the data transmission method (where data transmission requests are arbitrated based on channel performance and unit priority) if the transmission performance is measured by the transmission rate, the method first determines both the transmission time and the amount of data (transmission capacity) to be transmitted. It then calculates the transmission rate using these two values (transmission time and capacity) to decide which arbitration unit should handle the DMA request.
4. The method according to claim 1 , wherein the determining an arbitration unit corresponding to the channel among a plurality of arbitration units according to transmission performance corresponding to data in the channel comprises: determining a threshold range of the transmission performance corresponding to the data in the channel; according to a corresponding relation of the arbitration units and the threshold range, determining an arbitration unit corresponding to the threshold range of the transmission performance corresponding to the data in the channel, and using the determined arbitration unit corresponding to the threshold range as the arbitration unit corresponding to the channel.
The data transmission method (where data transmission requests are arbitrated based on channel performance and unit priority) selects the appropriate arbitration unit by defining ranges of acceptable transmission performance. Each arbitration unit is associated with a specific performance range. When a DMA request arrives, the method determines the performance of the channel and then selects the arbitration unit that corresponds to the performance range within which the channel's performance falls. This arbitration unit then handles the DMA request.
5. A data transmission device, comprising: a determining module configured, for a Direct Memory Access (DMA) channel, to determine an arbitration unit corresponding to the channel among a plurality of arbitration units according to transmission performance corresponding to data in the channel; a processing module configured, when determining that data in channels corresponding to at least two arbitration units need to be transmitted, to judge which data is to be transmitted firstly according to priorities of the at least two arbitration units; and the arbitration unit configured to receive a DMA request through the DMA channel from a hardware component to perform data transmission, and to send a command of data transmission to a bus command generator according to priorities of the arbitration units to perform data transmission by a bus controller; wherein the processing module is configured, after receiving data transmission commands corresponding to the at least two arbitration units within a set period of time, to determine that the data in the channels corresponding to the at least two arbitration units need to be transmitted; wherein the data transmission commands corresponding to the arbitration units are different; wherein the data transmission command comprises: a source address, a target address and a data identifier; the data transmission commands corresponding to the arbitration units are different in one or more of the followings: source addresses in the data transmission commands corresponding to the arbitration units are different; target addresses in the data transmission commands corresponding to the arbitration units are different; data identifiers in the data transmission commands corresponding to the arbitration units are different.
A data transmission device arbitrates Direct Memory Access (DMA) requests. A determining module selects one arbitration unit from multiple available units for each DMA channel based on the channel's expected data transmission performance. A processing module prioritizes data transmission requests from multiple arbitration units based on a pre-defined order when multiple arbitration units simultaneously request data transmission. The arbitration unit itself receives DMA requests from hardware components, and when selected, sends a data transmission command (containing source address, target address, and data identifier) to a bus command generator for data transfer by a bus controller. Arbitration occurs when multiple different data transmission commands are received within a set period. Data transmission commands are considered different if their source addresses, target addresses, or data identifiers differ.
6. The device according to claim 5 , wherein the transmission performance corresponding to the data in the channel is a transmission time of the data corresponding to the channel or a transmission rate of the data corresponding to the channel; the determining module is configured to determine the transmission time of the data corresponding to the channel or the transmission rate of the data corresponding to the channel.
The data transmission device (that arbitrates DMA requests based on channel performance and unit priority) uses the transmission time of the data in the channel or the transmission rate of the data in the channel as the metric for data transmission performance. The determining module calculates either the transmission time or the transmission rate to determine the appropriate arbitration unit.
7. The device according to claim 6 , wherein the transmission performance corresponding to the data in the channel is the transmission rate of the data corresponding to the channel; the determining module is configured to determine the transmission time and a transmission capacity of the data corresponding to the channel, and to determine the transmission performance corresponding to the data in the channel according to the transmission time and the transmission capacity.
In the data transmission device (that arbitrates DMA requests based on channel performance and unit priority), if transmission performance is measured by the transmission rate, the determining module first calculates both the transmission time and the amount of data (transmission capacity) to be transmitted. It then uses these two values (transmission time and capacity) to determine the transmission rate, which is used to select the appropriate arbitration unit.
8. The device according to claim 5 , wherein the determining module is configured to determine a threshold range of the transmission performance corresponding to the data in the channel, to determine an arbitration unit corresponding to the threshold range of the transmission performance corresponding to the data in the channel according to a corresponding relation of the arbitration units and the threshold range, and to use the determined arbitration unit corresponding to the threshold range as the arbitration unit corresponding to the channel.
The data transmission device (that arbitrates DMA requests based on channel performance and unit priority) selects the appropriate arbitration unit by defining ranges of acceptable transmission performance. The determining module associates each arbitration unit with a specific performance range. When a DMA request arrives, the determining module determines the channel's performance and then selects the arbitration unit that corresponds to the performance range within which the channel's performance falls. This arbitration unit then handles the DMA request.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
September 26, 2013
July 4, 2017
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.