Multi-channel DMA control method and system, electronic equipment and storage medium

By configuring priority registers and peripheral device request source in the DMA control system, the transmission conflict problem when accessing the same peripheral device request source is solved through multi-channel, efficient data transmission and system stability are achieved, and system flexibility is enhanced. Scalability.

CN119066002APending Publication Date: 2024-12-03SHENZHEN YSPRING TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411260518.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing DMA control system has transmission conflicts when accessing the same peripheral request source through multiple channels, resulting in inefficiency and insufficient flexibility.

Method used

By configuring the priority control bits in the priority registers of multiple direct memory access channels, dividing priority levels, and selecting different direct memory access channels for data transmission according to the priority level, and configuring the target peripheral request source to ensure data transmission Go to the right destination.

Benefits of technology

The DMA channel with the highest priority in resource conflicts first obtains access rights, ensuring timely transmission of critical data, avoiding unnecessary conflicts and errors, improving data transmission efficiency and system flexibility, and enhancing scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066002A_ABST
    Figure CN119066002A_ABST
Patent Text Reader

Abstract

The invention provides a multi-channel DMA (direct memory access) control method and system, electronic equipment and a storage medium, and relates to the technical field of transmission control, and the method comprises the following steps: respectively configuring priority control bits through priority registers of a plurality of direct memory access channels; dividing priority levels for the plurality of direct memory access channels according to the priority control bits; and selecting different direct memory access channels for data transmission according to the priority levels. Target peripheral equipment request sources of a plurality of direct memory access channels can be configured; and starting a direct memory access channel for data transmission according to the target peripheral equipment request source and the priority level. According to the invention, the priority order of each DMA channel is configured through the priority register, the timely transmission of key data is ensured, the request source is accurately identified through the configuration of the peripheral equipment request source register, the data is ensured to be transmitted to the correct destination, unnecessary conflicts and errors are avoided, and the flexibility and expandability of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of transmission control technology, and in particular to a multi-channel DMA control method, system, electronic equipment and storage medium. Background Art

[0002] With the rapid development of semiconductor integrated circuits, the requirements for the efficiency of memory and central processing unit in system-on-chip (SOC) are constantly increasing, and data transmission has become an important development direction to improve efficiency. Direct memory access (DMA) is an important data transmission method of SOC, which can realize batch and efficient data transmission between memory and I / O devices. At present, the requirements for the efficiency and design cost of DMA are constantly increasing, and new requirements are constantly being put forward for its technical diversity and flexibility to adapt to increasingly complex application scenarios.

[0003] Existing DMA control systems or methods either implement mutual exclusion of each channel request, using a mutual exclusion mechanism to prevent multiple channels from accessing the same resource at the same time, but this will cause transmission conflicts due to mutual exclusion between channels when multiple channels are working simultaneously; or each channel can only select requests from some peripheral devices, but cannot select requests from all peripheral devices, which reduces the flexibility of the system; or channel request caching is implemented, and request caching requires additional logic control. The current SOC's multi-channel multi-peripheral device request DMA controller has the problem of transmission conflicts when multiple channels access the same peripheral device request source. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a multi-channel DMA control method, system, electronic device and storage medium, which effectively solve the problem of transmission conflict when a DMA controller accesses the same peripheral device request source through multiple channels.

[0005] In a first aspect, the present invention provides a multi-channel DMA control method, the method comprising:

[0006] The priority control bits are configured separately through the priority registers of multiple direct memory access channels;

[0007] Classifying the priority levels of the plurality of direct memory access channels according to the priority control bit;

[0008] Different direct memory access channels are selected for data transmission according to the priority levels.

[0009] Furthermore, the method further comprises:

[0010] configuring a plurality of target peripheral device request sources of the direct memory access channels;

[0011] A direct memory access channel is started to perform data transmission according to the target peripheral device request source and the priority level.

[0012] Furthermore, the priority control bits are respectively configured through the priority registers of the plurality of direct memory access channels, including:

[0013] Acquire register group information of a plurality of direct memory access channels;

[0014] Determine the priority register according to the register group information;

[0015] A priority level value is set, the priority level value is written into the priority register, and the priority control bit is obtained.

[0016] Further, the selecting different direct memory access channels for data transmission according to the priority levels includes:

[0017] According to the priority levels, a first direct memory access channel with the highest priority level is selected to perform data transmission first;

[0018] When the data transmission of the first direct memory access channel is completed, a second direct memory access channel with the next highest priority level is selected for data transmission until all data transmission is completed.

[0019] Further, the target peripheral device request source configuring multiple direct memory access channels includes:

[0020] respectively configuring peripheral mapping control bits through the peripheral device request source registers of the plurality of direct memory access channels;

[0021] Configure a plurality of peripheral device request sources of the direct memory access channel according to the peripheral device mapping control bit;

[0022] A logic selector controlling the plurality of direct memory access channels selects a target peripheral device request source from among the plurality of peripheral device request sources.

[0023] Further, starting a direct memory access channel for data transmission according to the target peripheral device request source and the priority level includes:

[0024] selecting a first direct memory access channel with the highest priority according to the priority level;

[0025] detecting the target peripheral device request source corresponding to the first direct memory access channel, and starting the first direct memory access channel for data transmission;

[0026] After the first direct memory access channel completes data transmission, a feedback signal is sent to the target peripheral device to clear the target peripheral device request source;

[0027] Select a second direct memory access channel with the next highest priority level, and detect the target peripheral device request source corresponding to the second direct memory access channel until the data transmission is completed.

[0028] In a second aspect, the present invention provides a multi-channel DMA control system, the system comprising:

[0029] A first configuration module, configured to respectively configure priority control bits through priority registers of a plurality of direct memory access channels;

[0030] A level classification module, used for classifying the priority levels of the plurality of direct memory access channels according to the priority control bit;

[0031] The first control module is used to select different direct memory access channels for data transmission according to the priority level.

[0032] Furthermore, the system also includes:

[0033] A second configuration module, configured to configure a plurality of target peripheral device request sources of the direct memory access channels;

[0034] The second control module is used to start the direct memory access channel for data transmission according to the target peripheral device request source and the priority level.

[0035] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the multi-channel DMA control method as described in the first aspect of the present invention.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the multi-channel DMA control method as described in the first aspect of the present invention.

[0037] The multi-channel DMA control method, system, electronic device and storage medium provided by the present invention configure the priority order of each DMA channel through a priority register. When a resource conflict occurs, the DMA channel with the highest priority will first obtain access to the resource, thereby ensuring the timely transmission of key data. At the same time, the request source is accurately identified through the configuration of the peripheral device request source register, and the DMA controller can ensure that the data is transmitted to the correct destination to avoid unnecessary conflicts and errors. Through arbitration control, the system can maintain orderly competition between multiple DMA channels and request sources to avoid deadlock and data loss. Through sophisticated transmission control, the system can efficiently handle multiple concurrent data transmission tasks while maintaining data integrity and system stability, which not only improves the efficiency of data transmission, but also enhances the flexibility and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 This is a first schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0040] Figure 2 It is a second schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0041] Figure 3 It is a third schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0042] Figure 4 It is a fourth schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0043] Figure 5 is a fifth schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0044] Figure 6 is a sixth schematic diagram of the multi-channel DMA control method process provided by an embodiment of the present invention;

[0045] Figure 7 It is a first schematic diagram of the structure of a multi-channel DMA control system provided by an embodiment of the present invention;

[0046] Figure 8 is a second schematic diagram of a multi-channel DMA control system structure provided by an embodiment of the present invention;

[0047] Fig. 9 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention.

[0048] Description of main component symbols:

[0049] 700, multi-channel DMA control system; 710, first configuration module; 720, level division module; 730, first control module; 740, second configuration module; 750, second control module; 900, electronic device; 910, processor; 920, communication interface; 930, memory; 940, communication bus. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be further clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be noted that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0053] Existing DMA control systems or methods either implement mutual exclusion of each channel request, using a mutual exclusion mechanism to prevent multiple channels from accessing the same resource at the same time, but this will cause transmission conflicts due to mutual exclusion between channels when multiple channels are working simultaneously; or each channel can only select requests from some peripheral devices, but cannot select requests from all peripheral devices, which reduces the flexibility of the system; or channel request caching is implemented, and request caching requires additional logic control. The current SOC's multi-channel multi-peripheral device request DMA controller has the problem of transmission conflicts when multiple channels access the same peripheral device request source.

[0054] Example 1

[0055] The embodiment of the present invention provides a multi-channel DMA control method, which effectively solves the problem of transmission conflict when a DMA controller accesses the same peripheral device request source due to multiple channels. Figure 1 1 is a first schematic diagram of the multi-channel DMA control method provided by an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0056] S100, respectively configure priority control bits through priority registers of multiple direct memory access channels.

[0057] Any DMA channel has an independent register group, and the priority control bit can be configured through the priority register in the register group to set the priority level to control the priority of each DMA channel. Figure 2 2 is a second schematic diagram of the multi-channel DMA control method provided by an embodiment of the present invention. Figure 2 As shown, the configuration of the priority control bit includes the following steps:

[0058] S110, obtaining register group information of multiple direct memory access channels.

[0059] During the DMA transfer process, any DMA channel has an independent register group, which contains the necessary information to configure the DMA channel operating parameters.

[0060] S120. Determine a priority register according to the register group information.

[0061] The priority register is used to set the priority of the DMA channel to ensure that when multiple DMA channels request transmission at the same time, the system can process these requests in the predetermined priority order.

[0062] S130, setting a priority level value, writing the priority level value into a priority register, and obtaining a priority control bit.

[0063] In the priority register, there are one or more specific bits used to control the priority of the DMA channel. The priority control bits of the DMA channel can be configured by setting the high and low levels of these bits. The priority control bits can be divided into multiple levels (such as very high, high, medium, and low). You can choose the appropriate priority level according to actual needs. When setting the priority level of the DMA channel, you need to consider the actual load of the system and the responsiveness of the interrupt. For frequently used peripherals or critical tasks, a higher priority level should be given to ensure the real-time data transmission and system stability.

[0064] S200 , dividing priority levels into multiple direct memory access channels according to priority control bits.

[0065] The priority level of each DMA channel is set through the priority control bit of the priority register, and different priority levels are assigned to different DMA channels.

[0066] S300 , selecting different direct memory access channels for data transmission according to priority levels.

[0067] The logic control circuit of the DMA controller brings all DMA channels together and controls the logic selector to select the DMA channel for data transmission according to different priority levels. Figure 3 3 is a third schematic diagram of the multi-channel DMA control method provided by an embodiment of the present invention. Figure 3 As shown, the selection of DMA channel includes the following steps:

[0068] S310 , selecting a first direct memory access channel with the highest priority level according to the priority levels to perform data transmission first.

[0069] First, the DMA channel with the highest priority level is selected for data transmission. During the data transmission process, the DMA channel request with a low priority level cannot terminate the data transmission of the DMA channel with a high priority level.

[0070] S320: When the data transmission of the first direct memory access channel is completed, select a second direct memory access channel with the next highest priority level to perform data transmission until all data transmission is completed.

[0071] When the DMA channel with the highest priority level completes data transmission, the DMA channel transmission request of the next priority level is processed. The DMA channels of the next priority level may include multiple ones until all data transmissions are completed.

[0072] As a preferred implementation of the present invention, Figure 4 4 is a schematic diagram of a multi-channel DMA control method according to an embodiment of the present invention. Figure 4 As shown, the multi-channel DMA control method also includes the following steps:

[0073] S400, configuring a plurality of target peripheral device request sources of direct memory access channels.

[0074] In order to flexibly configure the DMA channel to respond to different peripheral requests, many microcontroller designs include peripheral mapping control functions, which are usually implemented through the peripheral request source register in the register group of the DMA controller. Figure 5 5 is a fifth schematic diagram of the multi-channel DMA control method provided by an embodiment of the present invention. Figure 5 As shown, the configuration of the target peripheral device request source includes the following steps:

[0075] S410 , respectively configuring peripheral mapping control bits through peripheral device request source registers of multiple direct memory access channels.

[0076] The peripheral mapping control bits are used to specify the peripheral request sources that each DMA channel can respond to. These peripheral mapping control bits can be used to configure the DMA channel to respond to specific peripheral device requests based on actual application requirements. By configuring the peripheral mapping control bits, developers can ensure that each DMA channel is bound to the correct peripheral device request source. Peripheral devices include but are not limited to analog-to-digital converters, serial communication interfaces, timers, and direct memory access managers.

[0077] S420, configuring a plurality of peripheral device request sources of direct memory access channels according to the peripheral mapping control bits.

[0078] In an embodiment of the present invention, according to actual application requirements, the peripheral device request source that each DMA channel needs to respond to is determined, and then specific values ​​are written into the peripheral device request source register in a programmatic manner to configure the peripheral mapping control bit. These specific values ​​determine the mapping relationship between the DMA channel and the peripheral request source.

[0079] S430: A logic selector controlling a plurality of direct memory access channels selects a target peripheral device request source from a plurality of peripheral device request sources.

[0080] The logic control circuit of the DMA controller brings together all peripheral request sources with DMA request function, and controls the logic selector to select any peripheral device request source according to the configuration value of the peripheral mapping control bit. Any DMA channel is configured with the configuration value of the peripheral mapping control bit, that is, the peripheral device request source is used as the target peripheral device request source of this DMA channel. Other unselected peripheral device request sources will not be able to affect the data transmission of this DMA channel, thereby realizing the mutual exclusion of the request source of any DMA channel.

[0081] S500: Start a direct memory access channel to perform data transmission according to a target peripheral device request source and a priority level.

[0082] Figure 6 6 is a schematic diagram of a multi-channel DMA control method according to an embodiment of the present invention. Figure 6 As shown, starting the direct memory access channel for data transmission includes the following steps:

[0083] S510 , selecting a first direct memory access channel with the highest priority according to the priority level.

[0084] S520: Detect a target peripheral device request source corresponding to the first direct memory access channel, and start the first direct memory access channel for data transmission.

[0085] When a request signal from a target peripheral device requesting a source transfer of a DMA channel with the highest priority level is detected, the DMA transfer control logic responds to the request signal and starts the DMA channel to perform data transfer.

[0086] S530 , after completing the data transmission through the first direct memory access channel, a feedback signal is sent to the target peripheral device to clear the request source of the target peripheral device.

[0087] After the DMA channel with the highest priority finishes transmitting data, the DMA transmission control logic sends a feedback signal to the target peripheral device to clear the transmission request signal.

[0088] S540: Select a second direct memory access channel with the next highest priority level, and detect a target peripheral device request source corresponding to the second direct memory access channel until data transmission is completed.

[0089] Select a DMA channel transfer request of the next priority level, where the DMA channels of the next priority level may include multiple ones, and detect the multiple DMA channels corresponding to the target peripheral device request source to start the channel for data transmission until all data transmission is completed.

[0090] The multi-channel DMA control method provided by the embodiment of the present invention configures the priority order of each DMA channel through a priority register. When a resource conflict occurs, the DMA channel with the highest priority will first obtain access to the resource, thereby ensuring the timely transmission of key data. At the same time, the request source is accurately identified through the configuration of the peripheral device request source register, and the DMA controller can ensure that the data is transmitted to the correct destination, avoiding unnecessary conflicts and errors.

[0091] Example 2

[0092] Based on the same technical concept as the method embodiment of the above embodiment 1, the embodiment of the present invention provides a multi-channel DMA control system. Figure 7 is a first schematic diagram of a multi-channel DMA control system structure provided by an embodiment of the present invention, such as Figure 7 As shown, the multi-channel DMA control system 700 includes:

[0093] The first configuration module 710 is used to respectively configure the priority control bits through the priority registers of multiple direct memory access channels.

[0094] The level classification module 720 is used to classify the priority levels of the multiple direct memory access channels according to the priority control bits.

[0095] The first control module 730 is used to select different direct memory access channels for data transmission according to priority levels.

[0096] As a preferred implementation of the present invention, Figure 8 is a second schematic diagram of a multi-channel DMA control system structure provided by an embodiment of the present invention, such as Figure 8 As shown, the multi-channel DMA control system 700 also includes:

[0097] A second configuration module 740, configured to configure a plurality of target peripheral device request sources of direct memory access channels;

[0098] The second control module 750 is used to start the direct memory access channel for data transmission according to the target peripheral device request source and priority level.

[0099] The multi-channel DMA control system provided by the embodiment of the present invention can maintain orderly competition between multiple DMA channels and request sources through arbitration control to avoid deadlock and data loss. Through fine transmission control, the system can efficiently handle multiple concurrent data transmission tasks while maintaining data integrity and system stability, which not only improves the efficiency of data transmission, but also enhances the flexibility and scalability of the system.

[0100] It can be understood that the implementation method of the multi-channel DMA control method described in the above embodiment 1 is also applicable to this embodiment and can achieve the same technical effect, so it will not be repeated here.

[0101] Example 3

[0102] Based on the same concept, an embodiment of the present invention further provides an electronic device, Fig. 9 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig. 9 As shown, the electronic device 900 may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the steps of the multi-channel DMA control method described in the above embodiments. For example, it includes:

[0103] S100, respectively configuring priority control bits through priority registers of multiple direct memory access channels;

[0104] S200, dividing priority levels of multiple direct memory access channels according to priority control bits;

[0105] S300, selecting different direct memory access channels for data transmission according to priority levels;

[0106] S400, configuring a target peripheral device request source of multiple direct memory access channels;

[0107] S500: Start a direct memory access channel to perform data transmission according to a target peripheral device request source and a priority level.

[0108] The processor 910 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0109] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0110] The memory 930 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0111] Example 4

[0112] Based on the same concept, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and the computer program includes at least one code segment, which can be executed by a main control device to control the main control device to implement the steps of the multi-channel DMA control method described in the above embodiments. For example, it includes:

[0113] S100, respectively configuring priority control bits through priority registers of multiple direct memory access channels;

[0114] S200, dividing priority levels of multiple direct memory access channels according to priority control bits;

[0115] S300, selecting different direct memory access channels for data transmission according to priority levels;

[0116] S400, configuring a target peripheral device request source of multiple direct memory access channels;

[0117] S500: Start a direct memory access channel to perform data transmission according to a target peripheral device request source and a priority level.

[0118] Based on the same technical concept, an embodiment of the present invention further provides a computer program, which is used to implement the above method embodiment when executed by a main control device.

[0119] The computer program may be stored in whole or in part on a computer-readable storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor.

[0120] Based on the same technical concept, an embodiment of the present invention further provides a processor, which is used to implement the above method embodiment. The above processor can be a chip.

[0121] In summary, the multi-channel DMA control method, system, electronic device and storage medium provided by the present invention configure the priority order of each DMA channel through a priority register. When a resource conflict occurs, the DMA channel with the highest priority will first obtain access to the resource, thereby ensuring the timely transmission of critical data. At the same time, the request source is accurately identified through the configuration of the peripheral device request source register, and the DMA controller can ensure that the data is transmitted to the correct destination to avoid unnecessary conflicts and errors. Through arbitration control, the system can maintain orderly competition between multiple DMA channels and request sources to avoid deadlock and data loss. Through sophisticated transmission control, the system can efficiently handle multiple concurrent data transmission tasks while maintaining data integrity and system stability, which not only improves the efficiency of data transmission, but also enhances the flexibility and scalability of the system.

[0122] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0123] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-channel DMA control method, characterized in that: The method comprises: The priority control bits are configured separately through the priority registers of multiple direct memory access channels; Classifying the priority levels of the plurality of direct memory access channels according to the priority control bit; Different direct memory access channels are selected for data transmission according to the priority levels.

2. The multi-channel DMA control method according to claim 1, characterized in that: The method further comprises: configuring a plurality of target peripheral device request sources of the direct memory access channels; A direct memory access channel is started to perform data transmission according to the target peripheral device request source and the priority level.

3. The multi-channel DMA control method according to claim 1, characterized in that: The priority control bits are configured respectively through the priority registers of the plurality of direct memory access channels, including: Acquire register group information of a plurality of direct memory access channels; Determine the priority register according to the register group information; A priority level value is set, the priority level value is written into the priority register, and the priority control bit is obtained.

4. The multi-channel DMA control method according to claim 1, characterized in that: The selecting different direct memory access channels for data transmission according to the priority levels includes: According to the priority levels, a first direct memory access channel with the highest priority level is selected to perform data transmission first; When the data transmission of the first direct memory access channel is completed, a second direct memory access channel with the next highest priority level is selected for data transmission until all data transmission is completed.

5. The multi-channel DMA control method according to claim 2, characterized in that: The target peripheral device request source configuring a plurality of the direct memory access channels comprises: respectively configuring peripheral mapping control bits through the peripheral device request source registers of the plurality of direct memory access channels; Configure a plurality of peripheral device request sources of the direct memory access channel according to the peripheral device mapping control bit; A logic selector controlling the plurality of direct memory access channels selects a target peripheral device request source from among the plurality of peripheral device request sources.

6. The multi-channel DMA control method according to claim 5, characterized in that: The step of starting a direct memory access channel for data transmission according to the target peripheral device request source and the priority level includes: selecting a first direct memory access channel with the highest priority according to the priority level; detecting the target peripheral device request source corresponding to the first direct memory access channel, and starting the first direct memory access channel for data transmission; After the first direct memory access channel completes data transmission, a feedback signal is sent to the target peripheral device to clear the target peripheral device request source; Select a second direct memory access channel with the next highest priority level, and detect the target peripheral device request source corresponding to the second direct memory access channel until the data transmission is completed.

7. A multi-channel DMA control system, characterized in that: The system comprises: A first configuration module, configured to respectively configure priority control bits through priority registers of a plurality of direct memory access channels; A level classification module, used for classifying the priority levels of the plurality of direct memory access channels according to the priority control bit; The first control module is used to select different direct memory access channels for data transmission according to the priority level.

8. The multi-channel DMA control system according to claim 7, characterized in that: The system further comprises: A second configuration module, configured to configure a plurality of target peripheral device request sources of the direct memory access channels; The second control module is used to start the direct memory access channel for data transmission according to the target peripheral device request source and the priority level.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the multi-channel DMA control method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-channel DMA control method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Direct memory access system and method based on multiple channels, electronic equipment, medium and program product

    CN120067003A

  • Multi-channel based direct memory access system, method, electronic device, medium and program product

    CN120067003B