Loop scheduling method in dynamic task chain form

Through the cyclic scheduling method in the form of dynamic task chains, the problem that cyclic task scheduling is not supported in the existing technology is solved, the computing performance of heterogeneous multi-core processor systems is improved, and the scheduling overhead of cyclic tasks is significantly reduced.

CN118708316AActive Publication Date: 2024-09-27HEFEI UNIV OF TECH

Patent Information

Application Number
CN202410746252.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-27
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

Existing dynamic scheduling methods do not support cyclic task scheduling, resulting in scheduling bottlenecks when tasks with the same structure are repeatedly scheduled, and fail to fully utilize the highly repetitive data exchange patterns and task dependencies during the execution of cyclic tasks.

Method used

A circular scheduling method in the form of a dynamic task chain is proposed. The scheduling control unit obtains task tags, generates scheduling control instructions, identifies task types, and generates dynamic task chains for recurring tasks. After the first round of scheduling, the dynamic task chain is used to complete subsequent cyclic scheduling. , to avoid secondary scheduling of tasks within the loop body.

Benefits of technology

It effectively improves the scheduling quality of cyclic tasks, significantly reduces the scheduling overhead of cyclic tasks, improves the computing performance of heterogeneous multi-core processor systems, and supports the scheduling of explicit and implicit cyclic tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708316A
    Figure CN118708316A
Patent Text Reader

Abstract

The invention discloses a loop scheduling method in a dynamic task chain form, and relates to the technical field of dynamic task scheduling of a heterogeneous multi-core computing system, the method is suitable for dynamic task scheduling of the heterogeneous multi-core computing system based on a coarse-grained reconfigurable architecture and oriented to dense computing application, a loop body task is regarded as a whole, and the dynamic task scheduling efficiency is improved. The method comprises the following steps of: executing a loop task in a first round, assigning a uniform priority, sequentially scheduling loop body tasks and recording a loop task scheduling result to generate a dynamic task chain when the loop task is executed in the first round, scheduling a loop after the first round by using the dynamic task chain, and only scheduling input and output of the dynamic task chain in a subsequent loop execution process. Secondary scheduling in the loop body is avoided; according to the technical scheme, the loop scheduling method is specially used for scheduling of the second round and the later round of the loop body task, the defect that an original dynamic scheduling method does not support loop task scheduling is overcome, and the scheduling bottleneck caused by repeated scheduling of tasks of the same structure is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of dynamic task scheduling of heterogeneous multi-core computing systems based on a coarse-grained reconfigurable architecture for intensive computing applications, and in particular to a cyclic scheduling method in the form of a dynamic task chain. Background Art

[0002] With the rapid development of computer and microelectronics technology, microprocessors with multiple computing cores, i.e., multi-core processors, have emerged. These multi-core processors are divided into two types: homogeneous multi-core processors and heterogeneous multi-core processors. Heterogeneous multi-core processors integrate cores of different structures on the same chip, so they can assign tasks to the most suitable cores for processing according to their characteristics.

[0003] In systems using heterogeneous multi-core processors, how to fully utilize processor resources with different performance, what task allocation strategy to adopt for resource management, and how to achieve automatic adjustment and load balancing of processor resources while maintaining flexibility and plasticity of task allocation are the core issues of resource scheduling and management in heterogeneous multi-core environments. Solving these problems is crucial to fully utilize the potential of processor resources and fully utilize the characteristics of heterogeneous multi-core processor systems.

[0004] At present, the methods for solving the task scheduling problem of heterogeneous multi-core processor systems are mainly divided into two categories: static task scheduling technology and dynamic scheduling technology. In dynamic scheduling technology, although task scheduling has achieved certain research results and effectively utilized the dependencies between tasks to optimize scheduling performance, the ability of task parallel processing still needs to be improved, especially for tasks containing loop structures, the scheduling method is still not perfect. In past studies, the existing dynamic scheduling algorithms do not support the defects of cyclic task scheduling. Most of them split tasks with cyclic structures into independent tasks for scheduling. Although this reduces the difficulty of scheduling method design, it does not make full use of the highly repetitive data exchange rules and task dependencies during the execution of cyclic tasks, and the scheduling bottleneck caused by repeated scheduling of tasks with the same structure will lead to a significant increase in scheduling overhead. Summary of the invention

[0005] The purpose of this application is to solve the defect that the original dynamic scheduling method does not support cyclic task scheduling in the dynamic task scheduling of heterogeneous multi-core computing systems based on coarse-grained reconfigurable architecture and oriented to intensive computing applications, and effectively avoid the scheduling bottleneck caused by repeated scheduling of tasks with the same structure.

[0006] The technical solution of the present application is to provide a cyclic scheduling method in the form of a dynamic task chain, which is used in a heterogeneous multi-core system. The heterogeneous multi-core system includes a dynamic scheduling controller and a state network. The dynamic scheduling controller includes a scheduling control unit, a mapping unit and a transmitting unit. The method includes:

[0007] Step 1: The scheduling control unit obtains the task tag and generates the corresponding scheduling control instruction SCI, which is sent to the decision queue;

[0008] Step 2, the judgment queue identifies the task type of SCI. When it is a cyclic task, execute step 3; when it is an independent task, execute step 7;

[0009] Step 3, the scheduling control unit sends the SCI to the cyclic task queue and stores the field representing the cyclic task information in the SCI;

[0010] Step 4, the scheduling control unit searches for the SCI in the cyclic task queue that matches the processing unit coordinates of the previous task, and sends the necessary task information RMI in its main segment to the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the RMI as the current task T_curr, and sends it to the ready queue for transmission. After T_curr is transmitted, the scheduling control unit obtains the mapping result of the next-level RMI. After T_curr is executed, the scheduling control unit writes its corresponding scheduling result into the cyclic scheduling queue, and transmits the tasks in the current loop body in sequence until all tasks complete the first round of scheduling. Based on the scheduling results of all tasks in the current loop body, a dynamic task chain of the loop body is generated, wherein the default processing unit coordinates are matched when the SCI has no previous task;

[0011] Step 5, the write-back judgment module receives the subsequent RMI output by the active queue, and selects the write-back method of the result data of T_curr according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and performs the write-back operation according to the selected write-back method;

[0012] Step 6: After the first round of scheduling is completed, the scheduling control unit directly sends the RMI corresponding to the SCI in the cyclic task queue to the ready queue for transmission according to the scheduling result in the cyclic scheduling queue, and performs a write-back operation;

[0013] Step 7, the scheduling control unit sends the RMI of the SCI with the highest priority to the active queue, and sends the remaining SCIs to the dormant queue;

[0014] Step 8: The scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the RMI as the current task T_curr, and sends it to the ready queue for transmission. After the transmission of T_curr is completed, the mapping result of the subsequent task is obtained;

[0015] Step 9, the scheduling control unit searches for the SCI in the dormant queue that matches the processing unit coordinates of T_curr, and sends its RMI to the active queue. The write-back judgment module selects the write-back method of the result data of T_curr according to the information of T_curr and the information of the subsequent RMI, and performs the write-back operation.

[0016] Furthermore, step 4 specifically includes:

[0017] Step 4.1, the scheduling control unit searches for the SCI in the cyclic task queue that matches the coordinates of the default processing unit of the first batch of tasks, and sends its corresponding RMI to the active queue;

[0018] Step 4.2, the scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the current RMI as the current task T_curr, and sends it to the ready queue for emission. After T_curr emission is completed, it continues to obtain the mapping result of the subsequent RMI;

[0019] Step 4.3, after T_curr is executed, the scheduling control unit writes the scheduling result of T_curr into the cyclic scheduling queue, obtains the coordinate information of the processing unit corresponding to T_curr through the state network, searches for the subsequent SCI matching the coordinate information in the cyclic task queue, and writes its corresponding RMI into the active queue;

[0020] Step 4.4, the scheduling control unit writes the mapping result of the subsequent RMI into the corresponding RMI, and sends it to the ready queue as the subsequent task T_succ for emission, and processes the tasks in the loop body in sequence according to the methods in steps 4.2 to 4.4 until all tasks in the current loop body complete the first round of scheduling;

[0021] Step 4.5, based on the scheduling results of all tasks in the current loop body, the used processing units and routing paths are temporarily locked to generate a dynamic task chain for the loop body.

[0022] Furthermore, step 5 specifically includes:

[0023] Step 5.1, the write-back judgment module judges whether T_curr has a subsequent task T_succ according to the coordinate matching result of T_curr and SCI. If there is no SCI matching the coordinate information of T_curr in the cyclic task queue, it is determined that T_curr has no T_succ, and the result data of T_curr is written back to DDR. If there is an SCI matching the coordinate information of T_curr in the cyclic task queue, it is determined that T_curr has T_succ, and step 5.2 is executed;

[0024] Step 5.2, determine whether the priority difference between the RMI of the subsequent stage and T_curr is greater than 1 according to the specific bit information of the RMI of the subsequent stage. If it is greater than 1, write the result data of T_curr back to DDR, and the scheduling control unit generates a Type III write-back SCI and writes it into the Type III write-back SCI queue. Set the wake-up condition as follows: T_succ has been emitted. If the priority difference between the RMI of the subsequent stage and T_curr is less than or equal to 1, execute step 5.3;

[0025] Step 5.3, obtain the processing unit type corresponding to the subsequent RMI, and determine the write-back type according to the emission status of the corresponding T_succ and the idle status of the processing unit of this type, as follows:

[0026] If T_succ has been emitted, write the result data of T_curr into the local storage of the processing unit corresponding to T_succ;

[0027] If T_succ is not issued and there are enough processing units of the corresponding type, the write-back operation is temporarily suspended until the corresponding processing unit is configured, and then the result data of T_curr is written to the local storage of the processing unit of T_succ;

[0028] If the corresponding type of processing units is insufficient, the result data of T_curr is written back to the on-chip cache, the scheduling control unit generates an I-type write-back SCI and writes it into the I-type write-back SCI queue, and sets the wake-up condition as: there is an idle processing unit of the corresponding type or T_succ has been emitted;

[0029] If there are not enough processing units of the corresponding type and the on-chip cache is insufficient, the result data of T_curr is written back to DDR, the scheduling control unit generates a Type II write-back SCI and writes it into the Type II write-back SCI queue, and the wake-up condition is set as: there are idle processing units of the corresponding type or T_succ has been transmitted.

[0030] Furthermore, during the dynamic task chain generation process, when there is an intermediate task in the loop body that needs to be written back to the on-chip cache or DDR, the dynamic scheduling controller divides the used processing units and routing paths into multiple groups based on the intermediate task, and generates dynamic task chains respectively, and uses these dynamic task chains to jointly complete the scheduling task; when the dynamic task chain generation process blocks the execution of independent tasks, the dynamic scheduling controller enables the counter and starts counting from the temporary suspension of the independent task blocking. When the count value reaches the set threshold, the dynamic task chain stops generating and schedules the tasks in the loop body as independent tasks.

[0031] Furthermore, step 6 specifically includes:

[0032] Step 6.1, the scheduling control unit directly sends the RMI corresponding to the SCI in the cyclic task queue to the ready queue in sequence according to the scheduling results corresponding to the tasks in the loop body;

[0033] Step 6.2, the ready queue sends the tasks corresponding to the RMI to the launch unit in the order of writing for launch. After each task is completed, the scheduling control unit notifies the launch unit to perform the write-back operation through a signal;

[0034] Step 6.3, the dynamic scheduling controller checks whether the current loop task meets the end condition. If so, the loop is terminated and the processing unit and routing path occupied by the loop task are released. Otherwise, the next round of loop scheduling is continued.

[0035] Furthermore, step 9 specifically includes:

[0036] Step 9.1, the scheduling control unit matches the coordinate information of the T_curr processing unit with the mapping coordinate segments of the SCI in the sleep queue one by one. If the coordinates match successfully, the RMI of the SCI is sent to the active queue as the subsequent RMI, otherwise the SCI is put back to the end of the sleep queue;

[0037] Step 9.2, the write-back judgment module receives the subsequent RMI output by the active queue, and selects the write-back method of the result data of T_curr according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and performs the write-back operation.

[0038] Furthermore, step 1 specifically includes:

[0039] The scheduling control unit obtains the task tag with the highest priority from the memory, and preprocesses the task tag to form the corresponding static task information STI, determines the storage address of STI according to the data segment representing the execution order in the task tag, and writes STI into the static task information library of the scheduling control unit in sequence according to the storage address, and then takes out STI from the static task information library in the writing order, splices the main segment of STI with its different communication segments one by one, merges the splicing result with the previous task mapping coordinates to generate the corresponding SCI, and sends SCI to the judgment queue.

[0040] Furthermore, the prerequisite for generating a dynamic task chain is that the task to be scheduled is a cyclic task, and the result data of the previous task must be written back to the processing unit of the current task.

[0041] Furthermore, the write-back method and write-back operation of the result data of T_curr selected in step 9.2 are the same as those in step 5.

[0042] The beneficial effects of this application are:

[0043] First, the technical solution in this application regards the loop body task as a whole, records the scheduling results of all tasks in the loop body when the loop is executed for the first time, and temporarily locks the processing units and routing paths used to generate a dynamic task chain. After completing the first round of scheduling, the dynamic task chain is used to complete the scheduling of subsequent loops. In the subsequent loop execution process, the dynamic scheduling controller only schedules the input and output of the dynamic task chain, directly sends the tasks in the loop task queue to the ready queue for transmission according to the obtained scheduling results, and performs write-back operations, omitting the matching of subsequent tasks, obtaining mapping results, and determining the write-back method in the first round of scheduling, thereby avoiding the secondary scheduling of tasks inside the loop body. Compared with the method of splitting the loop body task into independent tasks for scheduling in the prior art, the technical solution in this application makes full use of the highly repetitive data exchange rules and task dependencies during the execution of the loop task, effectively improves the scheduling quality of the loop task, significantly reduces the scheduling overhead of the loop task, and improves the computing performance of the heterogeneous multi-core processor system.

[0044] Second, the technical solution in the present application is applied in a heterogeneous multi-core computing system based on a coarse-grained reconfigurable architecture and oriented to intensive computing applications, and different scheduling modes are used to realize dynamic task scheduling of independent tasks and cyclic tasks. The technical solution in the present application also adopts a method of dividing a new dynamic task chain to solve the problem that the dynamic task chain cannot be generated because the intermediate task of the loop body needs to be written back to the on-chip cache or DDR when executing, and supports dividing the cyclic task into multiple local task chains to collaboratively complete the cyclic task scheduling, further enhancing the flexibility of processing cyclic tasks; adopts a method of forcibly stopping the generation of dynamic task chains to solve the problem that independent tasks are blocked for a long time and cannot be sent due to insufficient on-chip resources or too many processing units inside the loop body. While using dynamic task chains to execute cyclic body tasks, it does not affect the system scheduling of independent tasks, solves the defect that the dynamic scheduling method in the prior art does not support cyclic task scheduling, and effectively avoids the scheduling bottleneck caused by repeated scheduling of tasks with the same structure.

[0045] Third, the dynamic task chain generated in the technical solution of the present application supports the scheduling of explicit loop and implicit loop tasks. For explicit loop tasks, the end condition of the explicit loop is provided by global variables. For implicit loop tasks, the dynamic scheduling controller will issue the loop end condition as the last task of the loop body, and each round of calculation will be checked to see whether the end condition is met. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The advantages of the above and / or additional aspects of the present application will become apparent and easily understood in the description of the embodiments in conjunction with the following drawings, in which:

[0047] Figure 1 It is an operation process of task scheduling in a heterogeneous multi-core system according to an embodiment of the present application;

[0048] Figure 2 is the overall architecture of a dynamic scheduling controller according to an embodiment of the present application;

[0049] Figure 3 is a scheduling process diagram of a dynamic task chain scheduling mode according to an embodiment of the present application;

[0050] Figure 4 This is a SCI generation process according to an embodiment of the present application;

[0051] Figure 5 This is a scheduling process of an independent task scheduling mode according to an embodiment of the present application;

[0052] Figure 6 It is a module structure and operation mechanism of a heterogeneous multi-core system according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0054] In the following description, many specific details are elaborated to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present application is not limited to the specific embodiments disclosed below.

[0055] like Figure 2 , Figure 6 As shown, this embodiment provides a cyclic scheduling method in the form of a dynamic task chain, which is used for task scheduling in a heterogeneous multi-core system. The heterogeneous multi-core system includes a main controller, a dynamic scheduling controller, a configuration network, a state network, a data network, a global variable network, a processing unit PE and a memory DDR.

[0056] The dynamic scheduling controller is used for specific task scheduling and resource allocation. It includes an instruction fetch unit, a mapping unit, a write-back management unit, a launch unit, and a scheduling control unit. The overall architecture of the dynamic scheduling controller is as follows: Figure 2 As shown, it also contains an on-chip network layout diagram for storing the on-chip network coordinates of the processing unit. The external interface of the dynamic scheduling controller includes a configuration network interface, a status network interface, a global variable network interface for receiving and updating global variables, and a DDR interface for obtaining a task dependency table (a data structure for describing the dependency relationship between tasks).

[0057] The instruction fetch unit is used to obtain task-related information from the memory DDR; the mapping unit is used to obtain the coordinate information of the previous task processing unit from the state network, and generate a mapping result based on the coordinate information and feed it back to the scheduling control unit; the write-back management unit is used to manage the write-back operation of the current task result data and decide when to write the result data back to the target processing unit (for example, when the current task result data is written back to the on-chip cache, the write-back management unit provides a cache identifier to the scheduling control unit, and when the subsequent wake-up conditions are met, the result data is written back from the on-chip cache to the target processing unit); the launch unit is used to launch tasks; the scheduling control unit is the core of the dynamic scheduling controller, responsible for the coordination of various units within the dynamic scheduling controller, including the acquisition of task tags, the determination of task mapping coordinates, the real-time update of task execution status and the management of task write-back, to complete the out-of-order execution and dynamic scheduling of tasks.

[0058] The configuration network is used to transmit control instructions and configuration data to the dynamic scheduling controller and the main controller during system initialization and operation, so that each processing unit PE can correctly perform tasks; the status network is used to collect and transmit information from all computing nodes in real time, and monitor the status of the processing unit PE that executes tasks; the data network is responsible for data transmission tasks between various modules within the system; the global variable network is used to store and manage global variables in the system, and share data with various modules in the system; the processing unit PE is the unit that actually performs computing tasks in a heterogeneous multi-core system, and is used to receive control instructions and perform corresponding computing tasks; the memory DDR is used to store data during system operation.

[0059] like Figures 1 to 6 As shown, this embodiment provides a cyclic scheduling method in the form of a dynamic task chain, and the cyclic scheduling method in the form of a dynamic task chain includes the following steps:

[0060] Step 1: The scheduling control unit obtains the task tag from the memory DDR through the instruction fetch unit, generates the corresponding scheduling control instruction SCI, and sends it to the decision queue.

[0061] After the system is initialized, it enters the task execution stage. The task dependency table is stored in the memory DDR. The scheduling control unit obtains the task tag with the highest priority from the task dependency table through the instruction fetch unit, and pre-processes the task tag to remove the reserved segment (the reserved segment usually refers to those redundant or non-essential information in the task tag that does not affect task scheduling and execution) to form the corresponding short static task information STI (Static Task Information, STI). The task tag contains a data segment representing the execution order. The scheduling control unit determines the storage address of the static task information STI based on the data segment representing the execution order, and writes the corresponding static task information STI into the static task information library of the scheduling control unit according to the storage address.

[0062] The scheduling control unit takes out STI from the static task information library in sequence according to the writing order, and splices the main segment of STI with its different communication segments one by one, merges the splicing result with the previous task mapping coordinates, generates the corresponding scheduling control instruction SCI (Scheduling Control Instruction SCI), and sends the SCI to the judgment queue. The previous task mapping coordinates of the SCI corresponding to the scheduling task with a priority of 0 are set to 0. Specifically, the task label includes a main segment, a communication segment and a reserved segment, wherein there is one main segment and one or more communication segments. After taking out STI from the static task information library, first remove the reserved segment in the task label, then splice the main segment of STI with its different communication segments one by one, and then merge the splicing result with the previous task mapping coordinates (i.e., the coordinates of the task that has been launched), and finally generate the corresponding scheduling control instruction SCI. One task label can generate multiple scheduling control instructions SCI. The generation process of SCI is as follows. Figure 4 shown.

[0063] The task types scheduled by the heterogeneous multi-core system in this embodiment include independent tasks and cyclic tasks, wherein independent tasks do not require cyclic scheduling, and the priorities of independent tasks are different, while cyclic tasks require cyclic scheduling, and the priorities of cyclic tasks in a loop body (the loop body includes multiple cyclic tasks) are the same, and when the scheduling control unit obtains the task tag of the independent task from the task dependency table, it obtains the task tag with the highest priority each time, and when the scheduling control unit obtains the task tag of the cyclic task from the task dependency table, it obtains all the task tags of the loop body. In addition, after the scheduling control instruction SCI is generated corresponding to each cyclic task in the loop body, the SCI contains a data segment representing the execution order, so the priority of each SCI is different. When executing a cyclic task, it is sent to the ready queue according to the data segment representing the execution order in the SCI.

[0064] In this embodiment, during the initialization phase of the heterogeneous multi-core system, the main controller initializes the system components (including the dynamic scheduling controller) according to the BIOS instructions (BIOS instructions are a set of preset instructions built into the motherboard firmware, which are used to initialize the hardware at startup). The dynamic scheduling controller only performs initialization and does not participate in the configuration work at this stage. When the system completes the initialization and enters the task execution phase, the dynamic scheduling controller takes over the control of the system to transmit the task configuration instructions and stores the original configuration instructions issued by the main controller, such as Figure 6 As shown, the dynamic scheduling controller then dynamically generates, modifies and issues these configuration instructions according to the real-time operating status of the system, such as Figure 1 shown.

[0065] Step 2, the judgment queue identifies the task type of SCI. When the task type is a cyclic task (ie, a task in a loop body), execute step 3; when the task type is an independent task, execute step 7.

[0066] The scheduling control instruction SCI generated in step 1 is sent to the decision queue in turn. The decision queue identifies the task type of SCI in turn and processes different types of scheduling control instructions SCI using different methods. In this embodiment, a cyclic scheduling method in the form of a dynamic task chain is used to process cyclic tasks.

[0067] Step 3, the scheduling control unit sends the SCI to the cyclic task queue, and at the same time stores the field representing the cyclic task information in the scheduling control instruction SCI into the register.

[0068] For the first round of calculation of the SCI of the cyclic task, the scheduling control unit needs to send the SCI to the cyclic task queue, and at the same time send the field representing the cyclic task information in the SCI to the task additional information segment in the task information register group. In this embodiment, a task information register group is set in the dynamic scheduling controller, and the task information register group is composed of a plurality of registers, which are used to record the task information that will be frequently accessed, including the current task ID, the coordinates of the processing unit executing the current task, the number of outputs, and the task additional information.

[0069] Step 4, the scheduling control unit searches for the SCI in the cyclic task queue that matches the processing unit coordinates of the previous task, and sends the necessary task information RMI in its main segment to the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the RMI as the current task T_curr, and sends it to the ready queue for transmission. After T_curr is transmitted, the scheduling control unit obtains the mapping result of the subsequent RMI. After T_curr is executed, the scheduling control unit writes its corresponding scheduling result into the cyclic scheduling queue, and transmits the tasks in the current loop body in sequence until all tasks complete the first round of scheduling. Based on the scheduling results of all tasks in the current loop body, a dynamic task chain of the loop body is generated, wherein the default processing unit coordinates are matched when the SCI has no previous task.

[0070] Step 4.1, the scheduling control unit searches for the SCI in the cyclic task queue that matches the coordinates of the default processing unit of the first batch of tasks, and sends its corresponding RMI to the active queue;

[0071] The scheduling control unit matches the coordinate information of the default processing unit of the first batch of tasks with the mapping coordinate segments of the SCI in the cyclic task queue one by one. If the coordinates match successfully, the RMI corresponding to the current SCI is sent to the active queue, otherwise the SCI is put back to the end of the cyclic task queue. Before a task enters the active queue, it needs to match the processing unit coordinates of its predecessor task. For cyclic tasks, the first batch of tasks has no predecessor task, so when performing coordinate matching in step 4, the first batch of tasks needs to match the processing unit coordinates of the system default predecessor task, which is represented by the coordinates of the default processing unit.

[0072] In this embodiment, for tasks in the same loop body, the priority of each task is different and needs to be executed in a certain order. Therefore, the RMI corresponding to the task with the highest priority in the loop body enters the active queue first. Since this task has no previous task, the scheduling control unit needs to use the system default processing unit coordinates to find the SCI with matching coordinates from the loop task queue and put its corresponding RMI into the active queue (i.e., the first task in the loop body). Since the first RMI entering the active queue has no previous task, there is no need to perform a write-back operation on the result data of the previous task.

[0073] Step 4.2, the scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the current RMI as the current task T_curr, and sends it to the ready queue for emission. After T_curr emission is completed, it continues to obtain the mapping result of the subsequent RMI;

[0074] The scheduling control unit reads the RMI in the active queue and checks the launch conditions (a series of conditions that must be met during the task scheduling process set within the system to ensure that the task can be correctly sent to the execution unit), marks the RMI that currently meets the launch conditions as ready to launch, and sends its mapping identifier to the mapping unit in the dynamic scheduling controller, requests the mapping result from the mapping unit, and the mapping unit processes the received mapping identifier by optimizing the mapping mode to generate a mapping result. After obtaining the mapping result, the scheduling control unit writes it into the corresponding RMI and sends the modified RMI to the ready queue as the current task T_curr to be launched. The ready queue sends T_curr to the launch unit in the dynamic scheduling controller for launch.

[0075] After the launch unit launches the current task T_curr, the system starts to execute the calculation, the scheduling control unit waits for T_curr to be completed, and continues to send the mapping identifier of the subsequent RMI to the mapping unit to request the mapping result. The mapping unit generates the mapping result according to the mapping identifier, and stores the mapping result in the candidate result queue, waiting for the scheduling control unit to call it. After the current task T_curr is completed, the scheduling control unit calls the mapping result from the candidate result queue and writes it into the subsequent RMI, and writes the modified RMI into the ready queue as the subsequent task T_succ (that is, T_succ is the subsequent task pointed to by the result data after the execution of T_curr).

[0076] Step 4.3, after T_curr is executed, the scheduling control unit writes the scheduling result of T_curr into the cyclic scheduling queue, obtains the coordinate information of the processing unit corresponding to T_curr through the state network, searches for the subsequent SCI matching the coordinate information in the cyclic task queue, and writes its corresponding RMI into the active queue;

[0077] After the currently transmitted task T_curr is executed, the scheduling control unit writes the number of T_curr, the cycle number, the task internal priority, the mapping result and the destination of the write-back result data as the scheduling result into the cycle scheduling queue.

[0078] After the currently launched task T_curr is completed, the scheduling control unit obtains the coordinate information of the processing unit used by the task through the state network, and matches the mapping coordinate segments of the SCI with the coordinate information one by one in the cyclic task queue. If the coordinates match successfully, the corresponding RMI is sent to the active queue to execute the next step. If the coordinates do not match, the SCI is put back to the end of the cyclic task queue. The subsequent RMI that is sent to the active queue due to the completion of the currently launched task T_curr will be sent to the write-back judgment module after being output from the active queue.

[0079] In step 4.4, the scheduling control unit writes the mapping result of the subsequent RMI into the corresponding RMI, and sends it to the ready queue as the subsequent task T_succ for emission, and processes the tasks in the loop body in sequence according to the methods in steps 4.2 to 4.4 until all tasks in the current loop body complete the first round of scheduling.

[0080] In this embodiment, the scheduling control unit searches for the mapping result of the next-stage RMI from the candidate result queue, writes it into the corresponding RMI, sends the modified next-stage RMI into the ready queue as T_succ, and the ready queue sends T_succ to the transmitting unit for transmission. The tasks in the loop body are processed in sequence according to the method in step 4.2 to step 4.4 until all tasks in the current loop body complete the first round of scheduling.

[0081] Step 4.5, based on the scheduling results of all tasks in the current loop body, the used processing units PE and routing paths are temporarily locked to generate a dynamic task chain for the loop body.

[0082] The scheduling control unit obtains the scheduling result of the loop body according to the loop scheduling queue, obtains the data of the processing unit PE and routing path obtained in the first round of scheduling of the loop body according to the scheduling result, and temporarily locks the processing unit PE and routing path used to execute the task according to these data to form a dynamic task chain of the loop body.

[0083] The generation of a dynamic task chain must meet the following two prerequisites: the first is that the task to be scheduled must be a cyclic task; the second is that the result data of the previous task in the dynamic task chain must be written back to the processing unit of the current task.

[0084] There are two situations that hinder the generation of dynamic task chains (i.e., the first round of scheduling): 1. The result data of an intermediate task in the loop body needs to be written back to the on-chip cache or DDR, resulting in the inability to generate the dynamic task chain; 2. Insufficient on-chip resources or too many processing units used in the loop body, which blocks the sending of independent tasks for a long time while waiting for the dynamic task chain to be generated.

[0085] In view of the above two situations that hinder generation, the dynamic scheduling controller uses the following method to generate dynamic task chains:

[0086] When there is an intermediate task in the loop body that needs to be written back to the on-chip cache or DDR, the dynamic scheduling controller divides the processing units PE and routing paths used into multiple groups based on the intermediate task, and generates dynamic task chains respectively, and uses these dynamic task chains to jointly complete the scheduling task. Specifically, the dynamic scheduling controller forms a dynamic task chain with the processing units from the starting task to the intermediate task, and forms another dynamic task chain with the subsequent processing units that meet the dynamic task chain generation conditions to jointly complete the scheduling of the cyclic task. During this process, if multiple identical obstructions occur, the cyclic task can be divided into multiple dynamic task chains. At this time, the dynamic scheduling controller only needs to schedule the input and output of each dynamic task chain.

[0087] When the dynamic task chain generation process blocks the execution of independent tasks, the dynamic scheduling controller enables the counter and starts counting from the temporary suspension of the independent task blocking. When the count value reaches the set threshold, the dynamic task chain stops generating and schedules the tasks in the loop body as independent tasks.

[0088] In this embodiment, after completing the first round of scheduling of all tasks in the entire loop body, the loop scheduling queue obtains the scheduling results of all tasks in the loop body. When performing the subsequent second to Nth rounds (N is a positive integer) of loop scheduling, the scheduling control unit can obtain the scheduling results of the loop body based on the loop scheduling queue. Therefore, starting from the second round of scheduling, the scheduling control unit enters the dynamic task chain scheduling mode. During this process, the scheduling control unit not only transmits tasks according to the internal priority of the loop task, but also simultaneously issues the scheduling results of each task in the loop body. The dynamic task chain autonomously schedules tasks according to the issued scheduling results, and there is no need for the scheduling control unit to directly intervene in the scheduling process in the manner of the first round of task scheduling, thereby simplifying the scheduling requirements in subsequent cycles.

[0089] Step 5, the write-back judgment module receives the subsequent RMI output by the active queue, and selects the write-back method of the T_curr result data according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and the scheduling control unit performs the write-back operation according to the selected write-back method.

[0090] The loop body includes multiple loop tasks. After the current task is executed, the result data needs to be written back to the local storage of the processing unit corresponding to the subsequent task. The launch status of the subsequent task and the usage of the corresponding processing unit will affect the write-back method. Different situations in this embodiment correspond to different write-back methods.

[0091] It can be seen from the above step 4.3 that after T_curr is executed, the scheduling control unit obtains the coordinate information of the processing unit corresponding to T_curr through the state network and reads the SCI in the cyclic task queue, finds the SCI matching the coordinate information, and writes its corresponding RMI into the active queue. The subsequent RMI sent to the active queue due to the completion of the current task T_curr will be sent to the write-back judgment module in turn. The write-back judgment module selects the write-back method of the T_curr result data according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and performs the write-back operation, as follows:

[0092] Step 5.1, the write-back judgment module judges whether there is a subsequent task T_succ according to the matching result of the coordinate information of the processing unit corresponding to T_curr and the SCI. If there is no SCI matching the coordinate information of the currently transmitted task T_curr in the cyclic task queue (that is, there is no subsequent SCI of T_curr), it is determined that the currently transmitted task T_curr has no subsequent task T_succ, and the result data of T_curr is strongly written back to DDR, and the scheduling control unit itself does not generate a write-back SCI; if there is an SCI matching the coordinate information of the currently transmitted task T_curr in the cyclic task queue, it is determined that the currently transmitted task T_curr has a subsequent task T_succ, and step 5.2 is executed;

[0093] Step 5.2, the write-back judgment module determines whether the priority difference between the post-stage RMI (i.e., the RMI corresponding to the post-stage SCI) and T_curr is greater than 1 based on the specific bit information of the post-stage RMI (i.e., the RMI corresponding to the post-stage SCI) is greater than 1. If it is greater than 1, a strong write-back DDR operation is performed on the result data of T_curr, and the scheduling control unit generates a type III write-back SCI and writes it into the type III write-back SCI queue, and sets the wake-up condition for the write-back operation of the result data of T_curr in the type III write-back SCI queue to: T_succ has been emitted; after the wake-up condition is met, the scheduling control unit writes the result data of T_curr into the local storage of the processing unit corresponding to T_succ. If the priority difference between the post-stage RMI and T_curr is less than or equal to 1, execute step 5.3;

[0094] Step 5.3, obtain the processing unit type of T_succ corresponding to the subsequent RMI, and the write-back judgment module determines the write-back type according to the transmission status of T_succ and the idle status of the processing unit of this type fed back by the mapping unit. The rules are as follows:

[0095] When T_succ has been transmitted, the write-back judgment module determines to directly perform the write-back operation, and the scheduling control unit writes the result data of T_curr into the local storage of the processing unit corresponding to T_succ; wherein, the scheduling control unit informs the transmitting unit of the write-back status of the result data of T_curr through the work_mode signal so that the transmitting unit can perform the write-back operation.

[0096] When T_succ is not transmitted and there are enough processing units of the corresponding type, the write-back judgment module determines to temporarily suspend the write-back operation, and the scheduling control unit temporarily suspends the write-back operation of the result data of T_curr until the configuration of the corresponding processing unit is completed, and then writes the result data of T_curr into the local storage of the processing unit of T_succ; wherein, the scheduling control unit will inform the transmitting unit of the write-back status of the result data of T_curr through the work_mode signal so that the transmitting unit can perform the write-back operation.

[0097] When the corresponding type of processing unit is insufficient, the write-back judgment module determines to write back to the on-chip cache, and the scheduling control unit writes the result data of T_curr back to the on-chip cache, generates a type I write-back SCI, and writes it into the type I write-back SCI queue, and sets the wake-up condition of the write-back operation of the result data of T_curr in the type I write-back SCI queue as follows: there is an idle processing unit of the corresponding type or T_succ has been emitted; after the wake-up condition is met, the scheduling control unit writes the result data of T_curr into the local storage of the corresponding processing unit of T_succ. Specifically, the scheduling control unit selects the type of the processing unit with the most idleness on the current chip, and selects one of the processing units as the on-chip cache to store the result data of T_curr.

[0098] When there are insufficient processing units of the corresponding type and insufficient on-chip cache, the write-back judgment module determines to write back to the memory DDR, the scheduling control unit writes the result data of T_curr back to the DDR, generates a Type II write-back SCI and writes it into the Type II write-back SCI queue, and sets the wake-up condition for the write-back operation of the result data of T_curr in the Type II write-back SCI queue to: there is an idle processing unit of the corresponding type or T_succ has been emitted; after the wake-up condition is met, the scheduling control unit writes the result data of T_curr into the local storage of the corresponding processing unit of T_succ.

[0099] Specifically, for the three situations of writing back to DDR because the priority difference between the subsequent RMI and T_curr is greater than 1, writing back to the on-chip cache because the corresponding processing unit is insufficient, and writing back to the memory DDR because the on-chip cache is insufficient, the scheduling control unit will generate a specific communication task according to the cache identifier provided by the write-back management unit in the dynamic scheduling controller, and send the communication task to the ready queue, and at the same time copy the communication task to the write-back SCI queue to generate a write-back SCI. These SCIs generated by copying are called write-back SCIs, and the queue that stores the write-back SCIs is called the write-back SCI queue. Among them, the communication task generated by writing back to DDR because the priority difference between the subsequent RMI and T_curr is greater than 1 corresponds to the type III write-back SCI, the communication task generated by writing back to the on-chip cache because the corresponding processing unit is insufficient corresponds to the type I write-back SCI, and the communication task generated by writing back to the memory DDR because the on-chip cache is insufficient corresponds to the type II write-back SCI, wherein I, II, and III represent the type identifiers of the write-back SCI. In this embodiment, during the task scheduling process, different wake-up conditions are set for the three types of write-back SCIs, namely, Type I write-back SCI, Type II write-back SCI and Type III write-back SCI, generated by the scheduling control unit. At the same time, independent queues are configured for these three types of write-back SCIs. When the wake-up conditions are met, the write-back SCI will be activated by the scheduling control unit to perform the write-back operation.

[0100] The above-mentioned write-back operation is performed on the result data of the emitted tasks in sequence until the first round of scheduling of all tasks in the loop body is completed. In this embodiment, after the scheduling control unit enters the dynamic task chain scheduling mode, the processing units and routing paths involved in the calculation will be temporarily locked and will not be released immediately after the processing unit completes a calculation. They will only be released after the loop ends, ensuring that after the first round of scheduling of the loop task, the subsequent second to Nth rounds of scheduling can be successfully completed according to the scheduling results in the loop scheduling queue. During the second to Nth rounds of scheduling of the loop body task, the result data of T_curr is directly written back to the processing unit corresponding to T_succ.

[0101] Step 6: After the first round of scheduling is completed, the scheduling control unit directly sends the necessary task information RMI corresponding to the SCI in the cyclic task queue to the ready queue for transmission according to the scheduling result in the cyclic scheduling queue, and performs a write-back operation.

[0102] After the tasks in the loop body complete the first round of scheduling, a dynamic task chain of the loop body tasks is generated, and the scheduling control unit enters the dynamic task chain scheduling mode to perform the second to Nth rounds of loop scheduling.

[0103] Step 6.1, the tasks in the loop body start the second round of scheduling, and the scheduling control unit directly sends the RMI corresponding to the SCI in the loop task queue to the ready queue in sequence according to the scheduling results corresponding to the tasks in the loop body;

[0104] The loop scheduling queue includes the scheduling results corresponding to the RMI. The scheduling control unit can read the data in the scheduling results. There is no need to perform the complicated scheduling process in step 4 again. It only needs to execute the loop task through the formed dynamic task chain. That is, the dynamic scheduling controller only schedules the input and output of the dynamic task chain, avoiding secondary scheduling inside the loop body.

[0105] Step 6.2, the ready queue sends the tasks corresponding to the RMI to the transmitting unit in sequence according to the writing order for transmission. After each task is completed, the scheduling control unit notifies the transmitting unit to perform the write-back operation through a signal.

[0106] In this embodiment, after the scheduling control unit enters the dynamic task chain scheduling mode, the processing units and routing paths in the dynamic task chain can only be used to execute the current cycle task. Therefore, after the current task is completed, the scheduling control unit will hand over the operation of writing back the current task result data to the transmitting unit through the work_mode signal, and the transmitting unit will perform the write-back operation.

[0107] Step 6.3, the dynamic scheduling controller checks whether the current loop task meets the end condition. If so, the loop is terminated and the processing units and routing paths occupied by the loop task are released in order. If not, the next round of loop scheduling is continued.

[0108] In this embodiment, the heterogeneous multi-core system divides the loop body tasks into two categories: the first category is the display loop body task, the characteristic of this type of loop body task is that the number of loops has been determined before the task is executed, and the number of loops can be given by the global variables in the heterogeneous multi-core system. The second category is the implicit loop body task, the characteristic of this type of loop body task is that the number of loops cannot be determined before the task is executed, and conditional judgment is required after each round of loop tasks. The dynamic task chain scheduling mode can support the scheduling of display loop body tasks and implicit loop body tasks; for display loop body tasks, the end condition is provided by the global variable, such as the end condition is to reach the corresponding number of loops, each time a round of loops is completed, the system will count, and when the number of loops reaches the set value, the loop is terminated. For implicit loop body tasks, the dynamic scheduling controller will issue the loop end condition as the last task of the loop body, and will check whether the end condition is met after each round of calculation. If the loop body task meets the end condition, the processing units occupied by the loop body task will be released in order, otherwise the next round of loop scheduling will continue.

[0109] Step 7: The scheduling control unit sends the RMI of the SCI with the highest priority to the active queue, and sends the remaining SCIs to the dormant queue.

[0110] The scheduling control unit identifies the priority of the current scheduling control instruction SCI, and sends the required mission information RMI (Required Mission Information, RMI) in the main segment of the SCI with the highest priority to the active queue, and sends the remaining SCIs with low priority to the sleep queue, where the necessary task information RMI includes the amount of task input data, the type of processing unit PE (Process Element, processing unit) required for the task, etc.; in this embodiment, when the heterogeneous multi-core system is scheduled for the first time, the SCI with a priority of 0 is sent to the active queue, and the SCI with a priority greater than 0 is sent to the sleep queue.

[0111] In this embodiment, for the scheduling control instructions SCI of independent tasks, different SCIs have different priorities, and the RMIs corresponding to the SCIs also have different priorities. The RMIs with high priorities are processed first so that the tasks with high priorities can obtain system resources first.

[0112] Step 8, the scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the corresponding RMI as the current task T_curr, and sends it to the ready queue for transmission. After T_curr is transmitted, the mapping result of the subsequent task is obtained.

[0113] The scheduling control unit reads the RMIs in the active queue one by one and checks the launch conditions (a series of conditions that must be met during the task scheduling process set within the system to ensure that the task can be correctly sent to the execution unit), marks the RMI that meets the launch conditions as ready to launch, and sends its mapping identifier to the mapping unit in the dynamic scheduling controller, requests the mapping result from the mapping unit, and the mapping unit processes the received mapping identifier by optimizing the mapping mode to generate a mapping result. After obtaining the mapping result, the scheduling control unit writes it into the corresponding RMI and sends the modified RMI to the ready queue as the task to be launched. The ready queue sends the task to be launched to the launch unit in the dynamic scheduling controller in sequence according to the write order to launch the task.

[0114] After the launch unit launches the current task T_curr, the system starts to execute the calculation, the scheduling control unit waits for T_curr to be completed, and continues to send the mapping identifier of the subsequent RMI to the mapping unit to request the mapping result. The mapping unit generates the mapping result according to the mapping identifier, and stores the mapping result in the candidate result queue, waiting for the scheduling control unit to call it. After the current task T_curr is completed, the scheduling control unit calls the mapping result from the candidate result queue and writes it into the subsequent RMI, and writes the modified RMI into the ready queue as the subsequent task T_succ (that is, T_succ is the subsequent task pointed to by the result data after the execution of T_curr).

[0115] Step 9, the scheduling control unit searches for the SCI in the dormant queue that matches the processing unit coordinates of the currently launched task T_curr, and sends its RMI to the active queue. The write-back judgment module selects the write-back method of the result data of T_curr according to the information of T_curr and the information of the RMI output by the active queue, and performs the write-back operation, which specifically includes:

[0116] Step 9.1, the scheduling control unit matches the coordinate information of the processing unit PE used by the currently launched task T_curr with the mapping coordinate segment of the scheduling control instruction SCI in the sleep queue one by one. If the coordinates match successfully, the RMI of SCI is sent to the active queue as the next-level RMI, otherwise the SCI is put back to the end of the sleep queue;

[0117] After the currently launched task T_curr is completed, the scheduling control unit obtains the coordinate information of the processing unit PE used by the task through the state network, and matches the mapping coordinate segments of the SCI with the coordinate information one by one in the sleep queue. If the coordinates match successfully, the RMI of the corresponding SCI is sent to the active queue to execute the next step. If the coordinates do not match, the SCI is put back to the end of the sleep queue. This subsequent RMI that is sent to the active queue due to the completion of the currently launched task T_curr will be sent to the write-back judgment module in sequence after being output from the active queue.

[0118] Step 9.2, the write-back judgment module receives the RMI output by the active queue, and selects the write-back method of the result data of the currently emitted task T_curr according to the specific bit information in the RMI and the usage of the corresponding processing unit, and performs the write-back operation.

[0119] The process of selecting the write-back mode and executing the write-back operation in this step is the same as the process in step 5. The write-back judgment module judges whether there is a subsequent task T_succ according to the matching result of the coordinate information of the processing unit corresponding to T_curr and the SCI. If there is no subsequent SCI of the currently transmitted task T_curr, it is determined that the currently transmitted task T_curr has no subsequent task T_succ, and the result data of T_curr is strongly written back to DDR, and the scheduling control unit itself does not generate a write-back SCI; if there is a subsequent SCI of the currently transmitted task T_curr, it is determined that the currently transmitted task T_curr has a subsequent task T_succ;

[0120] After finding the next-level RMI of the currently launched task T_curr, the write-back judgment module determines whether the priority difference between the next-level RMI and T_curr is greater than 1 according to the specific bit information of the next-level RMI. If it is greater than 1, a strong write-back DDR operation is performed on the result data of T_curr. The scheduling control unit generates a type III write-back SCI and writes it into the type III write-back SCI queue. The wake-up condition of the write-back operation of the result data of T_curr in the type III write-back SCI queue is set as follows: T_succ has been launched; if the priority difference between the next-level RMI and T_curr is less than or equal to 1, the processing unit type of T_succ corresponding to the next-level RMI is obtained, and the write-back judgment module determines the write-back type according to the launch status of T_succ and the idle status of the processing unit of this type fed back by the mapping unit. The rules are as follows:

[0121] When T_succ has been transmitted, the write-back judgment module determines to directly perform the write-back operation, and the scheduling control unit writes the result data of T_curr into the local storage of the processing unit corresponding to T_succ; wherein, the scheduling control unit informs the transmitting unit of the write-back status of the result data of T_curr through the work_mode signal so that the transmitting unit can perform the write-back operation.

[0122] When T_succ is not transmitted and there are enough processing units of the corresponding type, the write-back judgment module determines to temporarily suspend the write-back operation, and the scheduling control unit temporarily suspends the write-back operation of the result data of T_curr until the configuration of the corresponding processing unit is completed, and then writes the result data of T_curr into the local storage of the processing unit of T_succ; wherein, the scheduling control unit will inform the transmitting unit of the write-back status of the result data of T_curr through the work_mode signal so that the transmitting unit can perform the write-back operation.

[0123] When there are insufficient processing units of the corresponding type, the write-back judgment module determines to write back to the on-chip cache, and the scheduling control unit writes the result data of T_curr back to the on-chip cache, and generates a Type I write-back SCI to write into the Type I write-back SCI queue, and sets the wake-up condition for the write-back operation of the result data of T_curr in the Type I write-back SCI queue to: there are idle processing units of the corresponding type or T_succ has been emitted; specifically, the scheduling control unit selects the type of processing unit with the most idle units on the current chip, and selects one of the processing units as the on-chip cache to store the result data of T_curr.

[0124] When there are insufficient processing units of the corresponding type and insufficient on-chip cache, the write-back judgment module determines to write back to the memory DDR, the scheduling control unit writes the result data of T_curr back to the DDR, and generates a Type II write-back SCI to write into the Type II write-back SCI queue, and sets the wake-up condition for the write-back operation of the result data of T_curr in the Type II write-back SCI queue to: there is an idle processing unit of the corresponding type or T_succ has been emitted.

[0125] This embodiment constructs the operation mechanism of a heterogeneous multi-core system. During the operation of the system, the main controller and the dynamic scheduling controller cooperate to complete the system operation and task scheduling management. The operation mechanism of the heterogeneous multi-core system includes an independent task scheduling mode and a dynamic task chain scheduling mode. The above-mentioned dynamic task chain form of cyclic scheduling method is used for scheduling cyclic tasks, which is a dynamic task chain scheduling mode. The heterogeneous multi-core system also includes the scheduling of independent tasks, that is, the independent task scheduling mode.

[0126] In summary, the present application proposes a loop scheduling method in the form of a dynamic task chain, which is suitable for dynamic task scheduling of heterogeneous multi-core computing systems based on coarse-grained reconfigurable architecture and oriented to intensive computing applications. In this method, the dynamic scheduling controller regards the loop body task as a whole, and the loop body task is given a unified priority. When the loop task is executed in the first round, the loop body task is scheduled in sequence and the loop task scheduling result is recorded to generate a dynamic task chain. The loop after the first round is scheduled using the dynamic task chain. In the subsequent loop execution process, the dynamic scheduling controller only schedules the input and output of the dynamic task chain to avoid secondary scheduling inside the loop body. Through the technical solution of the present application, the problem that the existing dynamic scheduling solution cannot support loop task scheduling is effectively solved, the scheduling quality of loop tasks is effectively improved, and the scheduling overhead of loop tasks is significantly reduced, thereby improving the computing performance of heterogeneous multi-core processor systems.

[0127] The steps in this application can be adjusted in order, combined, and deleted according to actual needs.

[0128] The units in the device of the present application can be combined, divided and deleted according to actual needs.

[0129] Although the present application is disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and are not intended to limit the application of the present application. The scope of protection of the present application is defined by the appended claims and may include various modifications, alterations and equivalents made to the invention without departing from the scope and spirit of the present application.

Claims

1. A cyclic scheduling method in the form of a dynamic task chain, the method is used for a heterogeneous multi-core system, the heterogeneous multi-core system includes a dynamic scheduling controller, a state network, the dynamic scheduling controller includes a scheduling control unit, a mapping unit and a transmitting unit, characterized in that: The method comprises: Step 1: The scheduling control unit obtains the task tag and generates the corresponding scheduling control instruction SCI, which is sent to the decision queue; Step 2, the judgment queue identifies the task type of SCI. When it is a cyclic task, execute step 3; when it is an independent task, execute step 7; Step 3, the scheduling control unit sends the SCI to the cyclic task queue and stores the field representing the cyclic task information in the SCI; Step 4, the scheduling control unit searches for the SCI in the cyclic task queue that matches the processing unit coordinates of the previous task, and sends the necessary task information RMI in its main segment to the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the RMI as the current task T_curr, and sends it to the ready queue for transmission. After T_curr is transmitted, the scheduling control unit obtains the mapping result of the next-level RMI. After T_curr is executed, the scheduling control unit writes its corresponding scheduling result into the cyclic scheduling queue, and transmits the tasks in the current loop body in sequence until all tasks complete the first round of scheduling. Based on the scheduling results of all tasks in the current loop body, a dynamic task chain of the loop body is generated, wherein the default processing unit coordinates are matched when the SCI has no previous task; Step 5, the write-back judgment module receives the subsequent RMI output by the active queue, and selects the write-back method of the result data of T_curr according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and performs the write-back operation according to the selected write-back method; Step 6: After the first round of scheduling is completed, the scheduling control unit directly sends the RMI corresponding to the SCI in the cyclic task queue to the ready queue for transmission according to the scheduling result in the cyclic scheduling queue, and performs a write-back operation; Step 7, the scheduling control unit sends the RMI of the SCI with the highest priority to the active queue, and sends the remaining SCIs to the dormant queue; Step 8: The scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the RMI as the current task T_curr, and sends it to the ready queue for transmission. After the transmission of T_curr is completed, the mapping result of the subsequent task is obtained; Step 9, the scheduling control unit searches for the SCI in the dormant queue that matches the processing unit coordinates of T_curr, and sends its RMI to the active queue. The write-back judgment module selects the write-back method of the result data of T_curr according to the information of T_curr and the information of the subsequent RMI, and performs the write-back operation.

2. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 1, characterized in that: The step 4 specifically includes: Step 4.1, the scheduling control unit searches for the SCI matching the coordinates of the default processing unit of the first batch of tasks in the cyclic task queue, and sends the corresponding RMI to the active queue; Step 4.2, the scheduling control unit reads the RMI in the active queue, obtains the mapping result of the current RMI from the mapping unit, writes the mapping result into the current RMI as the current task T_curr, and sends it to the ready queue for transmission. After T_curr is transmitted, the mapping result of the subsequent RMI is continuously obtained; Step 4.3, after T_curr is executed, the scheduling control unit writes the scheduling result of T_curr into the cyclic scheduling queue, obtains the coordinate information of the processing unit corresponding to T_curr through the state network, searches for the subsequent SCI matching the coordinate information in the cyclic task queue, and writes its corresponding RMI into the active queue; Step 4.4, the scheduling control unit writes the mapping result of the subsequent RMI into the corresponding RMI, and sends it to the ready queue as the subsequent task T_succ for emission, and processes the tasks in the loop body in sequence according to the methods in steps 4.2 to 4.4 until all tasks in the current loop body complete the first round of scheduling; Step 4.5, based on the scheduling results of all tasks in the current loop body, the used processing units and routing paths are temporarily locked to generate a dynamic task chain for the loop body.

3. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 2, characterized in that: The step 5 specifically includes: Step 5.1, the write-back judgment module judges whether T_curr has a subsequent task T_succ according to the coordinate matching result of T_curr and SCI. If there is no SCI matching the coordinate information of T_curr in the cyclic task queue, it is determined that T_curr has no T_succ, and the result data of T_curr is written back to DDR. If there is an SCI matching the coordinate information of T_curr in the cyclic task queue, it is determined that T_curr has T_succ, and step 5.2 is executed; Step 5.2, judging whether the priority difference between the RMI of the subsequent stage and T_curr is greater than 1 according to the specific bit information of the RMI of the subsequent stage, if it is greater than 1, the result data of T_curr is written back to the DDR forcibly, the scheduling control unit generates a type III write-back SCI and writes it into the type III write-back SCI queue, and sets the wake-up condition as follows: T_succ has been emitted, if the priority difference between the RMI of the subsequent stage and T_curr is less than or equal to 1, then executing step 5.3; Step 5.3, obtain the processing unit type corresponding to the subsequent RMI, and determine the write-back type according to the emission status of the corresponding T_succ and the idle status of the processing unit of this type, as follows: If T_succ has been emitted, write the result data of T_curr into the local storage of the processing unit corresponding to T_succ; If T_succ is not issued and there are enough processing units of the corresponding type, the write-back operation is temporarily suspended until the corresponding processing unit is configured, and then the result data of T_curr is written to the local storage of the processing unit of T_succ; If the corresponding type of processing units is insufficient, the result data of T_curr is written back to the on-chip cache, the scheduling control unit generates an I-type write-back SCI and writes it into the I-type write-back SCI queue, and sets the wake-up condition as: there is an idle processing unit of the corresponding type or T_succ has been emitted; If there are not enough processing units of the corresponding type and the on-chip cache is insufficient, the result data of T_curr is written back to DDR, the scheduling control unit generates a Type II write-back SCI and writes it into the Type II write-back SCI queue, and the wake-up condition is set as: there are idle processing units of the corresponding type or T_succ has been transmitted.

4. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 3, characterized in that: During the dynamic task chain generation process, when there is an intermediate task in the loop body that needs to be written back to the on-chip cache or DDR, the dynamic scheduling controller divides the used processing units and routing paths into multiple groups based on the intermediate task, and generates dynamic task chains respectively, and uses these dynamic task chains to jointly complete the scheduling task; when the dynamic task chain generation process blocks the execution of independent tasks, the dynamic scheduling controller enables the counter and starts counting from the temporary suspension of the independent task blocking. When the count value reaches the set threshold, the dynamic task chain stops generating and schedules the tasks in the loop body as independent tasks.

5. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 3, characterized in that: The step 6 specifically includes: Step 6.1, the scheduling control unit directly sends the RMI corresponding to the SCI in the cyclic task queue to the ready queue in sequence according to the scheduling results corresponding to the tasks in the loop body; Step 6.2, the ready queue sends the tasks corresponding to the RMI to the launch unit in the order of writing for launch. After each task is completed, the scheduling control unit notifies the launch unit to perform the write-back operation through a signal; Step 6.3, the dynamic scheduling controller checks whether the current loop task meets the end condition. If so, the loop is terminated and the processing unit and routing path occupied by the loop task are released. Otherwise, the next round of loop scheduling is continued.

6. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 1, characterized in that: The step 9 specifically includes: Step 9.1, the scheduling control unit matches the coordinate information of the T_curr processing unit with the mapping coordinate segments of the SCI in the sleep queue one by one. If the coordinates match successfully, the RMI of the SCI is sent to the active queue as the subsequent RMI, otherwise the SCI is put back to the end of the sleep queue; Step 9.2, the write-back judgment module receives the subsequent RMI output by the active queue, and selects the write-back method of the result data of T_curr according to the specific bit information in the subsequent RMI and the usage of the corresponding processing unit, and performs the write-back operation.

7. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 1, characterized in that: The step 1 specifically includes: The scheduling control unit obtains the task tag with the highest priority from the memory, and preprocesses the task tag to form the corresponding static task information STI, determines the storage address of STI according to the data segment representing the execution order in the task tag, and writes STI into the static task information library of the scheduling control unit in sequence according to the storage address, and then takes out STI from the static task information library in the writing order, splices the main segment of STI with its different communication segments one by one, merges the splicing result with the previous task mapping coordinates to generate the corresponding SCI, and sends SCI to the judgment queue.

8. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 4, characterized in that: The prerequisite for generating the dynamic task chain is that the task to be scheduled is a cyclic task, and the result data of the previous task must be written back to the processing unit of the current task.

9. The cyclic scheduling method in the form of a dynamic task chain as claimed in claim 1, characterized in that: The writing back method and operation of the result data of selecting T_curr in step 9.2 are the same as those in step 5.

Citation Information

Patent Citations

  • Scheduling system and scheduling execution method of multi-core heterogeneous system on chip

    CN102360309A

  • Method and system for dynamically and adaptively dividing and scheduling hybrid computing tasks of heterogeneous cloud computing platform

    CN113902120A

  • Dynamic task scheduling method capable of realizing regional extension remapping

    CN114880085A

  • Dynamic resource scheduling method and system based on heterogeneous reconfigurable

    CN115033356A

  • Multi-core task division scheduling method with safe time sequence

    CN117762596A

Cited By

  • Task timestamp recording method for simulating multi-core system network communication

    CN119886001A