CN118113643A - DMA control method, controller, and computer-readable storage medium - Google Patents

DMA control method, controller, and computer-readable storage medium Download PDF

Info

Publication number
CN118113643A
CN118113643A CN202310603863.7A CN202310603863A CN118113643A CN 118113643 A CN118113643 A CN 118113643A CN 202310603863 A CN202310603863 A CN 202310603863A CN 118113643 A CN118113643 A CN 118113643A
Authority
CN
China
Prior art keywords
request source
target
dma
control method
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310603863.7A
Other languages
Chinese (zh)
Inventor
唐会彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Chipsea Chuangxin Technology Co ltd
Original Assignee
Chengdu Chipsea Chuangxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Chipsea Chuangxin Technology Co ltd filed Critical Chengdu Chipsea Chuangxin Technology Co ltd
Priority to CN202310603863.7A priority Critical patent/CN118113643A/en
Publication of CN118113643A publication Critical patent/CN118113643A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)

Abstract

The application provides a DMA control method, a controller and a computer readable storage medium, wherein the DMA control method comprises the following steps: after the task execution of the current request source is completed, determining the next target request source; and configuring target task information corresponding to the target request source to the DMA controller so that the DMA controller acquires target data from the target request source according to the target task information. The embodiment of the application confirms the next target request source after the task of the current request source is completed, so that the DMA channel can be automatically matched with the target request source and data transmission can be carried out according to the target request source, and the problem that each channel in the original DMA design can only process fixed request sources is solved.

Description

DMA control method, controller, and computer-readable storage medium
Technical Field
The present application relates to the field of electronic technology, and in particular, to a DMA control method, a controller, and a computer readable storage medium.
Background
DMA (Direct Memory Access ) transfers allow hardware devices of different speeds to communicate without relying on the massive interrupt load of the CPU, thus allowing higher speeds to be achieved. DMA transfer does not save site, resume site, or the like during data transfer. Memory address modification, counting of the number of transferred words, etc., are not implemented by software, but directly by hardware lines. Therefore, the DMA mode can meet the requirement of high-speed I/O equipment and is also beneficial to the exertion of CPU efficiency.
However, each channel in existing DMA designs can only handle fixed request sources, resulting in lower transfer efficiency.
Disclosure of Invention
The present application provides a DMA control method, a controller, and a computer readable storage medium to solve the above technical problems.
In a first aspect, the present application provides a DMA control method, including:
After the task execution of the current request source is completed, determining the next target request source;
and configuring target task information corresponding to the target request source to a DMA controller so that the DMA controller acquires target data from the target request source according to the target task information.
In a second aspect, the present application provides a controller comprising:
The DMA controller is used for acquiring target task information and acquiring target data from the target request source according to the target task information;
The request source selection module is connected with the request source module and is used for determining a next target request source after the task of the current request source is executed; and configuring target task information corresponding to the target request source and sending the target task information to a DMA controller so that the DMA controller acquires target data from the target request source according to the target task information.
In a third aspect, the present application provides a computer readable storage medium having stored therein computer instructions which, when executed by a processor, implement a DMA control method according to any one of the preceding claims.
After the task execution of the current request source is completed, the next target request source is determined, and target task information corresponding to the target request source is configured to the DMA controller, so that the DMA controller acquires target data from the target request source according to the target task information. In the embodiment of the application, after the task of the current request source is completed, the next target request source is confirmed, so that the DMA channel can be automatically matched with the target request source and data transmission is carried out according to the target request source, the problem that each channel in the original DMA design can only process the fixed request source is solved, and once the DMA starts to transmit data, a CPU (central processing unit central processing unit) can not participate in changing the target request source, thereby omitting the operations of CPU instruction fetching, sending and the like, and further improving the transmission speed and the transmission efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the application and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a DMA control method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of determining a next target request source in the DMA control method shown in fig. 1.
FIG. 3 is a flow chart illustrating a method for determining a valid request source.
FIG. 4 is a first flow chart of matching linked list items.
FIG. 5 is a second flow chart of matching linked list items.
FIG. 6 is a third flow diagram of matching linked list items.
FIG. 7 is a fourth flow chart of matching linked list items.
Fig. 8 is a flow chart of processing a request source with a higher priority.
Fig. 9 is a schematic diagram of a first structure of a controller according to an embodiment of the present application.
Fig. 10 is a schematic diagram of a second structure of a controller according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The number of channels designed by the current DMA controller is limited, the number of system storage and peripheral devices far exceeds the use requirement, and if the problem is solved by increasing the number of physical channels, the problem of multiplied area is brought. In addition, each channel in the existing DMA design can only process a fixed request source, so that the DMA data transmission efficiency is lower.
In order to solve the above problems, embodiments of the present application provide a DMA control method, a controller, and a computer-readable storage medium.
The following will describe in detail. The order of the following examples is not limited to the preferred order of the examples.
Referring to fig. 1, fig. 1 is a flowchart illustrating a DMA control method according to an embodiment of the present application. The embodiment of the application provides a DMA control method, which comprises the following specific steps:
110. after the task execution of the current request source is completed, the next target request source is determined.
In some embodiments, the time to determine the next target request source may be after the current request source task is completed and before the next request source task is not started. In other embodiments, the determination of the time of the next target request source may also be at the time of execution of the current request source task. It will be appreciated that the time for determining the next target request source may be specifically set according to the actual situation, and is not specifically limited herein.
It should be noted that if there is only one DMA transfer channel, only one target request source needs to be determined to the DMA transfer channel. If there are multiple DMA transfer channels, it is necessary to determine multiple target request sources to multiple DMA transfer channels, so that each DMA transfer channel is configured with one target request source. It should be noted that, in the embodiment of the present application, how each DMA transfer channel configures one target request source is described as an example, and the case that multiple DMA transfer channels acquire target request sources respectively will not be described in detail.
It will be appreciated that in this embodiment, each DMA transfer channel is connected to all request sources, and can process requests from all request sources, so that each DMA transfer channel can determine the next target request source from all request sources. After each DMA transmission channel determines the target request source, each DMA transmission channel only receives the DMA transmission request of the target request source selected by itself and performs the corresponding data transmission task.
In some embodiments, determining the next target request source may be determining the target request sources in a predetermined rule order. The predetermined rule sequence may be a fixed sequence according to the identifier, the label or the number of the request source, and the label of the request source is taken as an example for illustration. Illustratively, the labels of the current request source and the labels of the plurality of request sources which are executing the task are obtained, and the labels of the target request sources are obtained according to the labels of the current request sources according to the ordering rule of the preset request source labels so as to determine the next target request source.
It may be understood that each request source is correspondingly provided with a label, where the label of the request source may be preset by the external device.
The labels of the request sources may be labels of the plurality of request sources according to time sequence, labels of the plurality of request sources may be labels of the plurality of request sources according to a priority level, labels of the plurality of request sources may be labels of the plurality of request sources according to size, and specific setting may be performed according to actual conditions, which is not limited in detail herein.
It should be noted that, the ordering of the request source labels may be ordered according to a fixed encoding rule, where the fixed encoding rule may be that two adjacent labels differ by 1 label, or that two adjacent labels differ by 2 labels, or that two adjacent labels differ by any number, and the ordering is not limited in this regard. Illustratively, in some embodiments, if the current request source has a reference number of 1 and two adjacent reference numbers differ by 1, then the target request source has a reference number of 2. In other embodiments, if the current request source has a reference number of 1 and two adjacent reference numbers differ by 2, then the target request source has a reference number of 3.
According to the embodiment of the application, the label of the target request source is obtained through the label of the current request source, so that the corresponding target request source can be selected, the channel of the DMA can automatically select the next target request source according to the label of the request source, and the problem that each channel in the original DMA design can only process the fixed request source is solved. And when the target request source is replaced, the CPU is not needed to participate, so that the operations of CPU instruction fetching, sending and the like are omitted, and the transmission speed and the transmission efficiency are further improved.
In other embodiments, determining the next target request source may be obtaining configuration information of a linked list item (LINK LIST ITEM, LLI) corresponding to the current request source, and determining the target request source according to the configuration information. The linked list configuration module comprises a plurality of linked list items, wherein the linked list items are linked list configuration structures which are generally supported by high-performance DMA and support configuration of multiple transmission configurations. Each link list item comprises storage data and configuration information, wherein the configuration information comprises the next target request source and a link list item address corresponding to the target request source.
The method includes the steps of sorting a plurality of request sources and link list items corresponding to the plurality of request sources according to the sequence of the DMA response request sources in advance, so that the link list item corresponding to each request source carries a next target request source and a target address of the link list item corresponding to the target request source, and therefore the next target request source can be determined by acquiring configuration information carried by the link list item corresponding to the current request source. For example, assuming that the order of the DMA response request sources is sequentially a first request source, a second request source and a third request source, configuration information in a link list item corresponding to the first request source carries a second request source and a link list item corresponding to the second request source, configuration information in a link list item corresponding to the second request source carries a third request source and a link list item corresponding to the third request source, and further, the second request source can be determined to be a target request source according to the configuration information carried in the link list item corresponding to the first request source, and the third request source can be determined to be a target request source according to the configuration information carried in the link list item corresponding to the second request source, so that configuration information of a next target request source and a next link list item can be obtained by obtaining the link list item corresponding to the current request source.
It should be noted that, the address of each link list item may be set adjacent to the address of the link list item corresponding to the current request source, or may be set at a fixed interval, or may be set at any interval, specifically set according to the actual situation, which is not limited specifically herein.
The embodiment of the application determines the next target request source through the configuration information of the link list item corresponding to the current request source, and solves the problem that each channel in the original DMA design can only process fixed request sources. And when the target request source is replaced, the CPU is not needed to participate, so that the operations of CPU instruction fetching, sending and the like are omitted, and the transmission speed and the transmission efficiency are further improved.
In other embodiments, determining the next target request source may be determining the target request source according to a preset configuration. For example, control information sent by the external device is acquired, and a next target request source is determined according to the control information. Namely, the software directly configures the target request source to automatically switch the request source, so that the CPU is not needed to participate, and the transmission speed and the transmission efficiency are improved. The control information sent by the external device may be obtained directly from the external device, or the external device may send the control information to the DMA controller. The setting may be specifically performed according to actual conditions, and no specific limitation is made here.
In other embodiments, the specific process of determining the next target request source may further refer to fig. 2, where fig. 2 is a schematic flow chart of determining the next target request source in the DMA control method shown in fig. 1. The specific flow is as follows:
111. It is detected whether there is a valid request source currently.
And detecting whether effective interrupt information exists, and if so, confirming that an effective request source exists.
As one way, it is possible to detect whether there is valid interrupt information when the currently transmitted data remains a preset value during the task of executing the current request source.
Alternatively, it is also possible to detect whether there is valid interrupt information after the task of the current request source is executed, i.e., after the current data transmission is ended and before the next task of the request source is started.
Alternatively, it may be determined whether there is valid interrupt information based on the write-back value of the linked-list item, which may be determined based on the interrupt latch address. Specifically, the system automatically latches upon generation of an interrupt signal, and the interrupt latch address may serve as the source of the writeable status register of the linked list item. The task of the request source is executed through the link list item, when the task of the current request source is finished, namely the link list item execution is finished, the system automatically recovers the latch state, and because the interrupt latch address is used as a source of a writable state register of the link list item, before the next request source task starts, whether effective interrupt information exists can be judged according to a write-back value corresponding to the address stored in the state register of the link list item.
The valid request sources may be detected at intervals of a preset time, or whether there is a valid request source may be always detected, and the valid request sources may be specifically set according to actual situations, which is not limited herein.
112. If the effective request source exists, determining a target request source according to effective information corresponding to the effective request source, wherein the effective information is used for representing the priority of the corresponding effective request source.
And if the valid request source is detected, acquiring the number of the valid request sources. And if the number of the effective request sources is 1, confirming that the effective request sources are target request sources. If the number of the effective request sources is greater than 1, effective information corresponding to the effective request sources is acquired, and a next target request source is determined from a plurality of effective request sources according to the effective information corresponding to the effective request sources.
If no valid request source is detected, determining the target request source according to a preset rule sequence or a preset configuration, and the specific manner can be referred to above and will not be described herein.
The target request source is determined by detecting the effective request source, namely, the target request source is dynamically detected in real time, and the target request source can be flexibly configured, so that the priority of the effective request source is ensured, the target request source corresponding to the effective request source is preferentially responded, and the instantaneity of the effective request source is improved.
In some embodiments, the specific situation of determining the target request source according to the valid information corresponding to the valid request source may continue to refer to fig. 3, and fig. 3 is a schematic flow chart of determining the target request source. The specific flow is as follows:
1121. the label of each valid request source is obtained.
The effective information corresponding to each effective request source comprises a label corresponding to the effective request source, namely each request source has a unique corresponding label. The foregoing may be the case of how to label the valid request sources, and is not described herein.
1122. And selecting the valid request source with the largest label or the smallest label as the target request source.
The valid request source with the highest label priority level can be the valid request source with the largest label, or the valid request source with the smallest label. The arrangement may be specifically made according to the actual situation, and is not particularly limited herein.
The embodiment of the application automatically determines the next target request source through the priority level of the effective request source label, thereby not only ensuring the principle of priority processing of important request sources, but also solving the problem that each channel in the original DMA design can only process fixed request sources, and no need to inquire the channel corresponding to each request source. And when the target request source is replaced, the CPU is not needed to participate, so that the operations of CPU instruction fetching, sending and the like are omitted, and the transmission speed and the transmission efficiency are further improved.
In other embodiments, determining the target request source according to the valid information corresponding to the valid request source may be determining the target request source according to the valid information according to a preset rule sequence. The specific scheme of determining the target request source according to the preset rule sequence can be seen from the above, and will not be described herein.
In other embodiments, determining the target request source according to the valid information corresponding to the valid request source may also be obtaining configuration information of the link list item corresponding to the current request source in the valid information, and determining the target request source according to the configuration information. The specific scheme of determining the target request source according to the configuration information can be seen from the above, and will not be described herein.
120. And configuring target task information corresponding to the target request source to the DMA controller so that the DMA controller acquires target data from the target request source according to the target task information.
After the target task information corresponding to the configuration target request source is sent to the DMA controller, the DMA controller acquires target data from the target request source according to the target task information.
It will be appreciated that after determining the target request source, it is further necessary to send target information to the linked list configuration module, and control the linked list configuration module to provide target data according to the target information, so that the target data obtained by the DMA controller from the linked list configuration module is consistent with the target request source.
After confirming the target request source, the linked list item matched with the target request source is required to be provided and loaded to the DMA for execution. The manner of matching linked list items can be seen in fig. 4 to 7.
For example, referring to fig. 4, fig. 4 is a schematic diagram of a first process for matching linked list items.
The specific flow is as follows:
1211. And acquiring the current address of the link list item corresponding to the current request source.
1212. And determining the preset offset of the address according to the offset between the current request source and the target request source.
1213. And shifting the current address according to the preset offset of the address to obtain the target address.
The address of the next linked list item is fixed to be the current address of the linked list item and the size of the next linked list item, namely, each time the linked list items are loaded in sequence, the linked list items are configured according to the serial numbers of the request sources, the similar 0-numbered request sources correspond to the 0-numbered linked list items, and the 1-numbered request sources correspond to the 1-numbered linked list items. After determining the target request source, the offset between the target request source and the current request source can be used as an offset preset amount of the address, so that the target address is obtained after the current address is offset by the preset amount, and is the address of the link list item loaded next.
1214. The target address is remapped so that the target address corresponds to the target request source.
When the request source is reconfigured, the target address is remapped, so that the target address corresponds to the target request source, and then the linked list item matched with the target request source can be provided to be loaded to the DMA for execution.
With continued reference to fig. 5, fig. 5 is a second flowchart of the DMA control method shown in fig. 1 for matching linked list entries. The specific flow is as follows:
1221. and acquiring configuration information of the link list item corresponding to the current request source, wherein the configuration information comprises a target address of the next link list item.
When the target request source is confirmed and is selected according to the configuration information carried by the link list item, the configuration information carried by the link list item corresponding to the current request source can be obtained, and the target address of the next link list item can be obtained according to the configuration information.
1222. And remapping the target address so that the target address corresponds to the target request source.
And when the request source is reconfigured, remapping the target address so that the target address corresponds to the target request source. And may in turn provide linked-list entry loads matching the target request source to DMA execution.
With continued reference to fig. 6, fig. 6 is a third flow chart of matching linked list entries in the DMA control method shown in fig. 1. The specific flow is as follows:
1231. And remapping the target address of the external register so that the target address corresponds to the target request source.
1232. And acquiring a target address from an external register to acquire a link list item corresponding to the target request source.
The external register is used as the position starting address of the next link list item, and the target address of the external register is remapped so as to enable the target address to correspond to the target request source, so that the target address can be obtained from the external register to obtain the link list item corresponding to the target request source. As an example, the external register may be an external configurable register, the location of the linked list item being consistent with the holding of the configurable register, while the register value of the configurable register is used as the location start address for the next linked list item, remapping may be achieved by updating the register value of the configurable register.
With continued reference to fig. 7, fig. 7 is a fourth flowchart of the DMA control method shown in fig. 1 for matching linked list entries. The specific flow is as follows:
1241. a mapping table between the request source and the linked list item is obtained.
1242. And obtaining the link list item corresponding to the target request source according to the mapping table.
By acquiring the mapping table between the request source and the link list item, a fixed relation between the request source and the link list item can be obtained, so that the corresponding link list item can be obtained according to the target request source, and the next link list item position remapping can be realized.
The embodiments of the present application provide several ways of providing the linked list item matched with the target request source to be loaded to the DMA for execution, and specific embodiments may be selected according to needs, which are not limited herein.
In some embodiments, when an effective request source with a higher priority appears, the current request source needs to be executed to execute the request source with a higher priority, so that the response speed to the request source with a higher priority is slower. The specific flow is as follows:
210. And when the task of the first request source is executed, if the residual data is not transmitted to be completed, and the effective request source corresponding to the second request source is detected, and the priority level of the second request source is higher than that of the first request source, suspending the task of the first request source, and executing the task of the second request source.
When a second request source with higher priority level appears, the remaining data which is not transmitted and is corresponding to the first request source is needed to be stored, and the task of the second request source is started to be executed.
220. After the task of the second request source is completed, determining the next target request source or continuing to execute the task of the first request source.
In some embodiments, when the task of the second request source is completed, the plurality of valid request sources are acquired again, and the next target request source is determined from the plurality of valid request sources and the first request source, so that the priority of the request sources is guaranteed in real time.
In other embodiments, after the task of the second request source is completed, the task of the first request source is continuously executed, so that the priority of the first request source is ensured.
According to the DMA control method provided by the embodiment of the application, after the task of the last request source is completed through the DMA, the next target request source is automatically determined, a plurality of DMA channels can be automatically matched with the target request source, and data transmission is carried out according to the target request source, so that the problem that each channel in the original DMA design can only process the fixed request source is solved. In addition, once the DMA starts to transmit data, the CPU does not need to participate in the process of replacing the target request source, so that the operations of CPU instruction fetching, sending and the like are omitted, and the transmission speed and the transmission efficiency are further improved.
In order to facilitate better implementation of the DMA control method provided by the embodiment of the present application, the embodiment of the present application further provides a controller based on the DMA control method. Where the meaning of nouns is the same as in the DMA control method described above, specific implementation details may be referred to in the description of the method embodiments.
With continued reference to fig. 9, fig. 9 is a schematic diagram of a first structure of a controller according to an embodiment of the application. The embodiment of the application provides a controller 100, wherein the controller 100 comprises a DMA controller 20 and a request source selection module 10, the DMA controller 20 is used for acquiring target data, the request source selection module 10 is connected with the request source module, and the request source selection module 10 is used for determining the next target request source after the task execution of the current request source is completed; the target task information corresponding to the configuration target request source is sent to the DMA controller 20, so that the DMA controller 20 obtains target data from the target request source according to the target task information. The controller 100 provided in the embodiment of the present application determines the next target request source through the request source selection module 10, and controls the DMA controller 20 to obtain the target data according to the target request source, so that the problem that each channel in the original DMA design can only process the fixed request source is solved, and the CPU does not need to participate in replacing the target request source, thereby omitting operations such as instruction fetching, sending, and the like of the CPU, and further improving the transmission speed and the transmission efficiency.
With continued reference to fig. 10, fig. 10 is a schematic diagram of a second structure of the controller according to the embodiment of the application. The controller 100 further includes a linked list configuration module 30, the linked list configuration module 30 includes configuration information, the linked list configuration module 30 is connected with the request source selection module 10, and the request source selection module 10 is further configured to obtain the configuration information of the linked list configuration module 30, and determine a target request source according to the configuration information.
The request source selection module 10 includes a configuration identification unit 101 and a selection unit 102, where the selection unit 102 is connected to the configuration identification unit 101, and the configuration identification unit 101 is used to determine a next target request source. The selecting unit 102 is configured to obtain the target request source sent by the configuration identifying unit 101, and send target task information corresponding to the target request source to the DMA controller 20.
The selection unit 102 is connected to the linked list configuration module 30, where after the selection unit 102 selects the target request source, the selection unit 102 sends target information to the linked list configuration module 30, and the linked list configuration module 30 provides target data according to the target information, so that the target data acquired by the DMA controller 20 from the linked list configuration module 30 is consistent with the target request source.
The embodiment of the application also provides a computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and when the stored computer instructions are executed on a computer, the computer is caused to execute the steps of the DMA control method provided by the embodiment of the application. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
In addition, in the foregoing embodiments, the descriptions of the embodiments are focused on, and for the parts that are not described in detail in a certain embodiment, reference may be made to the foregoing detailed description of the fault presenting method, which is not repeated herein.
It should be noted that, the controller 100 provided in the embodiment of the present application and the DMA control method in the above embodiment belong to the same concept, where the DMA control method may be applied to any embodiment provided in the embodiment of the controller 100, and detailed implementation processes of the DMA control method are shown in the embodiment of the DMA control method and are not repeated herein.
It should be noted that in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The DMA control method, the controller 100, and the computer-readable storage medium provided by the embodiments of the present application are described in detail above. Specific examples are set forth herein to illustrate the principles and embodiments of the present application and are provided to aid in the understanding of the present application. Meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the present description should not be construed as limiting the present application in summary.

Claims (22)

1. A DMA control method, characterized in that the DMA control method comprises:
After the task execution of the current request source is completed, determining the next target request source;
and configuring target task information corresponding to the target request source to a DMA controller so that the DMA controller acquires target data from the target request source according to the target task information.
2. The DMA control method according to claim 1, wherein the determining a next target request source includes:
and determining a target request source according to a preset rule sequence.
3. The DMA control method according to claim 1, wherein the determining a next target request source includes:
and acquiring configuration information of a link list item corresponding to the current request source, and determining a target request source according to the configuration information.
4. The DMA control method according to claim 1, wherein the determining a next target request source includes:
And determining a target request source according to the preset configuration.
5. The DMA control method according to claim 2, wherein the determining a next target request source includes:
Detecting whether a valid request source exists currently;
if the effective request source exists, determining a target request source according to effective information corresponding to the effective request source, wherein the effective information is used for representing the priority of the corresponding effective request source.
6. The DMA control method according to claim 5, wherein after said detecting whether there is a valid request source at present, further comprising:
if not, determining a target request source according to a preset rule sequence or preset configuration.
7. The DMA control method according to claim 5, wherein the determining a target request source according to the valid information corresponding to the valid request source includes:
Acquiring the label of each effective request source;
and selecting the valid request source with the largest label or the smallest label as the target request source.
8. The DMA control method according to claim 5, wherein the determining a target request source according to the valid information corresponding to the valid request source includes:
and determining the target request source according to the effective information according to a preset rule sequence.
9. The DMA control method according to claim 5, wherein the determining a target request source according to the valid information corresponding to the valid request source includes:
And acquiring configuration information of a link list item corresponding to the current request source in the effective information, and determining a target request source according to the configuration information.
10. The DMA control method according to any one of claims 5 to 9, wherein the detecting whether there is a valid request source at present comprises:
Detecting whether effective interrupt information exists;
and if the effective interrupt information is detected, confirming the effective request source.
11. The DMA control method according to claim 10, wherein the detecting whether there is valid interrupt information includes:
And determining whether effective interrupt information exists according to the write-back value of the link list item, wherein the write-back value of the link list item is determined according to the interrupt latch address.
12. The DMA control method according to any one of claims 1 to 9, wherein the configuring the target task information corresponding to the target request source to be sent to a DMA controller, so that the DMA controller obtains target data from the target request source according to the target task information, includes:
Acquiring a current address of a link list item corresponding to the current request source;
Determining a preset offset of an address according to the offset between the current request source and the target request source;
The current address is shifted according to the preset offset of the address to obtain a target address;
and remapping the target address so that the target address corresponds to the target request source.
13. The DMA control method according to any one of claims 1 to 9, wherein the configuring the target task information corresponding to the target request source to be sent to a DMA controller, so that the DMA controller obtains data from the target number of target request sources according to the target task information, includes:
acquiring configuration information of a link list item corresponding to the current request source, wherein the configuration information comprises a target address of a next link list item;
and remapping the target address so that the target address corresponds to the target request source.
14. The DMA control method according to any one of claims 1 to 9, wherein the configuring the target task information corresponding to the target request source to be sent to a DMA controller, so that the DMA controller obtains target data from the target request source according to the target task information, includes:
Remapping a target address of an external register so that the target address corresponds to the target request source;
And acquiring a target address from an external register to acquire a link list item corresponding to the target request source.
15. The DMA control method according to any one of claims 1 to 9, wherein the configuring the target task information corresponding to the target request source to be sent to a DMA controller, so that the DMA controller obtains target data from the target request source according to the target task information, includes:
obtaining a mapping table between a request source and a link list item;
and obtaining a link list item corresponding to the target request source according to the mapping table.
16. The DMA control method according to any one of claims 1 to 9, characterized in that the DMA control method further comprises:
When executing the task of the first request source, if residual data are not transmitted to be completed, and an effective request source corresponding to a second request source is detected, and the priority level of the second request source is higher than that of the first request source, suspending the task of the first request source, and executing the task of the second request source;
and after the task of the second request source is completed, determining a next target request source or continuously executing the task of the first request source.
17. The DMA control method according to any one of claims 1 to 9, wherein the configuring the target task information corresponding to the target request source to be sent to a DMA controller, so that the DMA controller obtains target data from the target request source according to the target task information, includes:
And the control linked list configuration module provides target data according to the target task information so that the target data acquired by the DMA controller from the linked list configuration module is consistent with the target request source.
18. A controller, the controller comprising:
The DMA controller is used for acquiring target task information and acquiring target data from the target request source according to the target task information;
The request source selection module is connected with the request source module and is used for determining a next target request source after the task of the current request source is executed; and configuring target task information corresponding to the target request source and sending the target task information to a DMA controller so that the DMA controller acquires target data from the target request source according to the target task information.
19. The controller of claim 18, wherein the controller further comprises:
the linked list configuration module comprises configuration information, the linked list configuration module is connected with the request source selection module, and the request source selection module is further used for obtaining the configuration information of the linked list configuration module and determining a target request source according to the configuration information.
20. The controller of claim 19, wherein the request source selection module comprises:
the configuration identification unit is used for determining a next target request source;
The selection unit is connected with the configuration identification unit and is used for sending target task information corresponding to the target request source to the DMA controller.
21. The controller of claim 20, wherein the selection unit is coupled to the linked list configuration module, the selection unit sending target task information to the linked list configuration module after selecting the target request source, the linked list configuration module providing target data based on the target task information to cause the target data obtained by the DMA controller from the linked list configuration module to be consistent with the target request source.
22. A computer readable storage medium having stored therein computer instructions which when executed by a processor implement the DMA control method of any of claims 1-17.
CN202310603863.7A 2023-05-26 2023-05-26 DMA control method, controller, and computer-readable storage medium Pending CN118113643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310603863.7A CN118113643A (en) 2023-05-26 2023-05-26 DMA control method, controller, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310603863.7A CN118113643A (en) 2023-05-26 2023-05-26 DMA control method, controller, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN118113643A true CN118113643A (en) 2024-05-31

Family

ID=91207668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310603863.7A Pending CN118113643A (en) 2023-05-26 2023-05-26 DMA control method, controller, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN118113643A (en)

Similar Documents

Publication Publication Date Title
US10877766B2 (en) Embedded scheduling of hardware resources for hardware acceleration
US8516163B2 (en) Hardware-based concurrent direct memory access (DMA) engines on serial rapid input/output SRIO interface
CN109144922B (en) Data transmission device and method thereof
US20070074214A1 (en) Event processing method in a computer system
US20030061428A1 (en) Dynamic master/slave configuration for multiple expansion modules
US8051234B2 (en) Multiprocessor system
JP2004038758A (en) Storage controller, control method for storage controller, and program
US6240479B1 (en) Method and apparatus for transferring data on a split bus in a data processing system
JP2013069110A (en) Control device and program
CN105527881A (en) Command processing method and device
EP0538829A2 (en) Apparatus for reducing interrupt retry attempts
EP2312457A2 (en) Data processing apparatus, data processing method and computer-readable medium
US7827343B2 (en) Method and apparatus for providing accelerator support in a bus protocol
JP2009176103A (en) Method, system and program for controlling nic connection of virtual network system
JPH0926885A (en) Circuit and method for control for multiple priority interrupt request with reference to microprocessor
CN102622274B (en) Computer device and interrupt task allocation method thereof
CN118113643A (en) DMA control method, controller, and computer-readable storage medium
US8359564B2 (en) Circuit design information generating equipment, function execution system, and memory medium storing program
CN101939733A (en) External device access apparatus, control method thereof, and system lsi
EP0742520A2 (en) Information processing system for performing mutual control of input/output devices among a plurality of clusters
EP1988464A1 (en) Snoop control method and information processing device
CN106844036A (en) The access method and device of physical equipment
US20050138236A1 (en) Direct memory access control device and method for automatically updating data transmisson size from peripheral
US20030041190A1 (en) System and method for efficiently performing a command swapping procedure
US9229886B2 (en) Management data transfer between processors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination