Task scheduling device and task scheduling method
The task scheduling device optimizes task execution and data communication in electronic control devices with multiple SoCs by setting time slots and determining communication orders, addressing inefficiencies in existing technologies.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-04-02
AI Technical Summary
Existing task scheduling technologies for electronic control devices with multi-core configurations fail to accurately predict series processing times and do not consider data communication between System on a Chip (SoC) units, leading to inefficient task allocation.
A task scheduling device and method that includes a time slot setting unit, communication time candidate determination unit, and communication order determination unit to schedule tasks and data communication between multiple task processing units, considering communication timings and data sizes to optimize task execution.
Achieves appropriate task scheduling and data communication order to optimize latency and efficiency in electronic control devices with multiple SoCs, ensuring timely data availability for task execution.
Smart Images

Figure JP2025023547_02042026_PF_FP_ABST
Abstract
Description
Task Scheduling Device, Task Scheduling Method
[0001] The present invention relates to a device and a method for scheduling when an electronic control device executes tasks.
[0002] In an electronic control device mounted on an automobile or the like, various arithmetic processes (tasks) are executed at a predetermined cycle to realize a desired function. In recent years, in order to improve the processing ability of the electronic control device, the use of an electronic control device adopting a multi-core has been progressing. When using such a multi-core type electronic control device, by appropriately performing task scheduling in advance and determining which task to execute in what order on each core, efficient task allocation becomes possible. Therefore, a technology for realizing appropriate task scheduling is required.
[0003] As an existing technology related to task scheduling, the following Patent Document 1 is known. Patent Document 1 discloses an electronic control device that predicts the execution time on board in advance by acquiring a feature amount of the task at the time of task execution and executes another process in the free area. Thereby, in an electronic control device adopting a multi-core, it becomes possible to realize more efficient task allocation.
[0004] Japanese Patent Application Laid-Open No. 2019-125093
[0005] In the electronic control device described in Patent Document 1, the execution time of the task is predicted based on the feature amount of the task. However, in such a method, although it is possible to predict the execution time of each task alone, it is not possible to correctly predict the series of processing times when processing is carried out in cooperation between tasks. Further, Patent Document 1 assumes an electronic control device adopting a multi-core, but does not target an electronic control device having a multi-chip configuration with a plurality of SoCs (System on a Chip), and therefore data communication between SoCs is not considered.
[0006] In view of the above problems, the present invention aims to achieve appropriate task scheduling for an electronic control device having multiple task processing units and where data communication is performed between each task processing unit.
[0007] The task scheduling device according to the present invention schedules a plurality of tasks to be executed in an electronic control device having a plurality of task processing units, and comprises: a time slot setting unit that sets time slots that define the timing at which each task processing unit executes each of the tasks; a communication time candidate determination unit that finds communication time candidates representing candidate communication timings for a plurality of data to be input and output to each task processing unit; a communication time determination unit that finds the communication time required for the communication of the data; and a communication order determination unit that determines the communication order of the plurality of data based on the communication time candidates and the communication time, wherein the tasks include a first task and a second task, the task processing unit includes a first task processing unit that executes the first task and generates the data, and a second task processing unit that executes the second task using the data generated by the first task processing unit, and the communication time candidates include a first time when the first task processing unit can generate the data and transmit it to the second task processing unit, and a second time when the second task processing unit needs to acquire the data from the first task processing unit in order to execute the second task.The task scheduling method according to the present invention is a method performed by a computer for scheduling a plurality of tasks to be performed in an electronic control device having a plurality of task processing units, wherein the computer sets time slots that define the timing at which each task processing unit performs each task, the computer obtains communication time candidates that represent candidate communication timings for a plurality of data to be input and output to each task processing unit, the computer obtains the communication time required for the communication of the data, the computer determines the communication order of the plurality of data based on the communication time candidates and the communication time, the plurality of tasks include a first task and a second task, the plurality of task processing units include a first task processing unit that performs the first task and generates the data, and a second task processing unit that performs the second task using the data generated by the first task processing unit, and the communication time candidates include a first time at which the first task processing unit can generate the data and transmit it to the second task processing unit, and a second time at which the second task processing unit needs to obtain the data from the first task processing unit in order to perform the second task.
[0008] According to the present invention, an electronic control device having multiple task processing units and where data communication is performed between each task processing unit can achieve appropriate task scheduling.
[0009] This figure shows an example configuration of an electronic control device that is the target of task scheduling by a task scheduling device according to one embodiment of the present invention. This is a configuration diagram of a task scheduling device according to the first embodiment of the present invention. This is a diagram showing an example of task input / output information. This is a diagram showing an example of task execution information. This is a diagram showing an example of time slot setting information. This is a diagram showing the processing flow of the communication time candidate determination unit. This is a diagram showing an example of communication time candidate information. This is a diagram showing an example of bus speed information. This is a diagram showing an example of data size information. This is a diagram showing the processing flow of the communication time determination unit. This is a diagram showing an example of communication time information. This is a diagram showing the processing flow of the communication order determination unit. This is a diagram showing an example of communication order information. This is a configuration diagram of a task scheduling device according to the second embodiment of the present invention. This is a diagram showing the processing flow of the communication delay time evaluation unit. This is a diagram showing an example of communication delay time evaluation information. This is a configuration diagram of a task scheduling device according to the third embodiment of the present invention. This is a diagram showing the processing flow of the communication bus load calculation unit. This is a diagram showing an example of communication bus load information. This is a diagram showing the processing flow of the task execution location change unit.
[0010] Embodiments of the present invention will be described below with reference to the drawings. The following description and drawings are illustrative for illustrating the present invention, and have been omitted and simplified as appropriate for clarity of explanation. The present invention can also be carried out in various other forms. Unless otherwise specified, each component may be singular or plural.
[0011] The positions, sizes, shapes, and ranges of the components shown in the drawings may not represent their actual positions, sizes, shapes, and ranges in order to facilitate understanding of the invention. Therefore, the present invention is not necessarily limited to the positions, sizes, shapes, and ranges disclosed in the drawings.
[0012] <Configuration of Vehicle Control Device> Figure 1 is a diagram showing an example of the configuration of an electronic control device that is subject to task scheduling by a task scheduling device according to one embodiment of the present invention. The electronic control device 100 shown in Figure 1 is an ECU (Electronic Control Unit) used in a vehicle such as an automobile, and has a plurality of SoCs 101, 102.
[0013] Data transmitted from various other devices mounted on the vehicle is input to SoCs 101 and 102, respectively. For example, data transmitted from sonar 110, radar 120, and camera 130 and received by the electronic control unit 100 is input to SoC 102. Data transmitted from additional camera 140 and Lidar (Light Detection and Ranging) 150 and received by the electronic control unit 100 is input to SoC 101.
[0014] SoCs 101 and 102 each execute predetermined tasks using the input data and output data corresponding to the execution results of those tasks. At this time, data output from one SoC may be input to the other SoC and used in the tasks executed by that SoC. For example, in the configuration example in Figure 1, the output data from SoC 101 is input to SoC 102 and used in the tasks executed by SoC 102 together with the data transmitted from sonar 110, radar 120, and camera 130. On the other hand, the output data from SoC 102 is transmitted from the electronic control unit 100 to the steering 160, accelerator 170, and brake 180 and used for their control. As a result, the steering 160, accelerator 170, and brake 180 are controlled according to the surrounding conditions of the vehicle measured by the sensors of sonar 110, radar 120, camera 130, additional camera 140, and Lidar 150, thereby realizing automated driving control of the vehicle.
[0015] Note that the configuration of the electronic control unit 100 shown in Figure 1 is just one example, and other configurations are also possible. For example, configurations in which the types and number of sensors, the number of SoCs, etc. are increased or decreased from the configuration in Figure 1 are also conceivable. As long as there are multiple SoCs as task processing units that execute tasks, the electronic control unit 100 can take any configuration.
[0016] (First Embodiment) Next, a first embodiment of the present invention will be described.
[0017] <Configuration of the Task Scheduling Device> Figure 2 is a configuration diagram of a task scheduling device according to the first embodiment of the present invention. The task scheduling device 1 shown in Figure 2 is a device that schedules tasks to be executed in the SoCs 101 and 102 of the electronic control device 100 shown in Figure 1. The task scheduling device 1 is configured to include the following functional blocks: a time slot setting unit 11, a communication time candidate determination unit 12, a communication required time determination unit 13, and a communication order determination unit 14, as well as task input / output information 21, task execution information 22, time slot information 23, communication time candidate information 24, bus speed information 25, data size information 26, communication required time information 27, and communication order information 28.
[0018] Task input / output information 21 is information that represents, on a task-by-task basis, the data that is input to and output to SoC 101 and 102 when SoC 101 and 102 execute a task. Task execution information 22 is information that represents the time required for SoC 101 and 102 to execute each task. This information is stored in advance, for example, in the task scheduling device 1. The time slot setting unit 11 sets the time slots for the tasks that SoC 101 and 102 will execute based on the task input / output information 21 and the task execution information 22, and generates time slot information 23 that represents the setting details. A time slot defines the timing at which SoC 101 and 102 will execute each task. Details of how the time slot setting unit 11 sets the time slots will be described later.
[0019] The communication time candidate determination unit 12 determines candidate communication timings for each data related to task execution in SoC 101 and 102 based on task input / output information 21 and time slot information 23, and generates communication time candidate information 24 representing the content of these candidate timings. Specifically, the communication time candidate determination unit 12 determines communication time candidates for each combination of data transmission and reception destinations in SoC 101 and 102, including candidate timings for when each data used for task execution becomes transmittable and candidate timings for when the transmission of each data should be completed, and generates communication time candidate information 24. Details of how the communication time candidate determination unit 12 determines communication time candidates will be described later.
[0020] Bus speed information 25 represents the communication speed of each communication bus used for data communication within the electronic control unit 100 and between the electronic control unit 100 and other devices. Data size information 26 represents the size of each data used for task execution in SoC 101 and 102, respectively. This information is stored in advance, for example, in the task scheduling device 1. The communication time determination unit 13 calculates the time required for communication of each data related to task execution in SoC 101 and 102 based on the bus speed information 25 and data size information 26, and generates communication time information 27 representing the calculation result. Details of the method for calculating the communication time by the communication time determination unit 13 will be described later.
[0021] The communication order determination unit 14 determines the communication order of each data related to task execution in SoC 101 and 102 based on the communication time candidate information 24 and the communication required time information 27, and generates communication order information 28 representing the contents of the order. Details of how the communication order determination unit 14 determines the communication order of each data will be described later.
[0022] The task scheduling device 1 shown in Figure 2 may, for example, be mounted on the electronic control device 100 as a function of the electronic control device 100, or another electronic control device mounted on the vehicle may be used as the task scheduling device 1. Alternatively, the task scheduling device 1 may be realized using a computer installed in a location separate from the vehicle. The task scheduling device 1 can be realized in any manner as long as it is configured using various computers and the computer executes a predetermined program to operate as the respective functional blocks of the time slot setting unit 11, communication time candidate determination unit 12, communication required time determination unit 13, and communication order determination unit 14.
[0023] <Task Input / Output Information> Figure 3 shows an example of task input / output information 21. As shown in Figure 3, task input / output information 21 contains information on the input data and output data for each task. For example, task A is executed with data 1 as input and outputs data 2 as the result of its execution. Here, data 1 is also the input for task B and task D in addition to task A. In this way, the same data may be used as input data for multiple tasks. Also, task B receives data 1 and data 3 as input and outputs data 4 and data 5. In this way, multiple data may be input and output for a single task.
[0024] <Task Execution Information> Figure 4 shows an example of task execution information 22. As shown in Figure 4, task execution information 22 contains information on the execution cycle and worst-case execution time for each task. Worst-case execution time represents the maximum time required to execute each task (the upper limit of the execution time required for each task in the system design, or the longest execution time measured in advance for each task). In other words, although the actual execution time required for each task may vary due to factors such as fluctuations in input data, it is guaranteed that in all cases the execution will be completed within the worst-case execution time and that data corresponding to the execution result of the task will be output.
[0025] <Time Slot Setting Unit> The time slot setting unit 11 sets which SoC and at what timing each task will be executed, based on the task input / output information 21 illustrated in Figure 3 and the task execution information 22 illustrated in Figure 4. At this time, if the SoC has multiple cores, it also sets which core the task will be executed on. Here, for example, using a known task scheduling method such as LET (Logical Execution Time), the time slot for each task can be set by determining the SoC, core, and offset values to be assigned to each task so that all tasks satisfy the input / output relationship of the data represented by the task input / output information 21 in Figure 3, and the execution period and worst execution time represented by the task execution information 22 in Figure 4.
[0026] Specifically, for example, the task input / output information 21 in Figure 3 shows that task C uses data 2 output from task A and data 4 output from task B as input data. Therefore, it is clear that task C must be executed after task A and task B have completed their execution. In other words, if task A and task B are executed on different cores, task C must be executed after the larger of the worst execution times of these tasks has elapsed from the start of the execution cycle. On the other hand, if task A and task B are executed on the same core of the same SoC, task C must be executed after the sum of their respective worst execution times has elapsed from the start of the execution cycle. In the task execution information 22 in Figure 4, the worst execution time of task A is 20 ms and the worst execution time of task B is 10 ms. Therefore, if they are executed on different cores, task C must be executed 20 ms or later from the start of the execution cycle, and if they are executed on the same core, task C must be executed 30 ms or later from the start of the execution cycle.
[0027] By setting time slots for each task as described above, when task C is executed, tasks A and B will always be completed, and data 2 and data 4 will have been generated. Therefore, it is guaranteed that the input data for task C is always up-to-date. In other words, even if the execution times of tasks A and B fluctuate, it is possible to execute task C while reliably reflecting the results of these tasks, thus guaranteeing that the same execution result will be obtained for task C.
[0028] <Time Slot Information> Figure 5 shows an example of time slot information 23. The time slot setting unit 11 generates time slot information 23, such as that shown in Figure 5, from the task input / output information 21 in Figure 3 and the task execution information 22 in Figure 4. As shown in Figure 5, the time slot information 23 indicates which core and at what timing each task will be executed. Specifically, in the time slot information 23 of Figure 5, for example, for task A, the values of SoC, core, and offset are "SoC1", "0", and "10ms", respectively. This indicates that task A will be executed on core 0 of SoC 101 at a timing 10ms after the start of each execution cycle (100ms). Also, for task C, the values of SoC, core, and offset are "SoC2", "0", and "40ms", respectively. This indicates that task C will be executed on core 0 of SoC 102 at a timing 40ms after the start of each execution cycle (50ms).
[0029] <Communication Time Candidate Determination Unit> Figure 6 shows the processing flow of the communication time candidate determination unit 12.
[0030] In step S110, the communication time candidate determination unit 12 acquires task input / output information 21 that is pre-stored in the task scheduling device 1.
[0031] In step S120, the communication time candidate determination unit 12 acquires the time slot information 23 that has been generated by the time slot setting unit 11 and stored in the task scheduling device 1.
[0032] In step S130, the communication time candidate determination unit 12 determines whether or not there is any unprocessed data among the data represented by the task input / output information 21 acquired in step S110. Here, it determines whether or not there is any data in the task input / output information 21 that has not yet undergone the processing in steps S140 to S180, and if there is, it proceeds to step S140. On the other hand, if there is no unprocessed data, that is, if the processing in steps S140 to S180 has already been performed for all the data represented by the task input / output information 21 acquired in step S110, the processing flow in Figure 6 is terminated.
[0033] In step S140, the communication time candidate determination unit 12 selects one of the unprocessed data from among the data represented by the task input / output information 21 acquired in step S110. As a result, for example, in the task input / output information 21 in Figure 3, one of data 1 to data 7 is selected.
[0034] In step S150, the communication time candidate determination unit 12 searches the task input / output information 21 for a task that outputs the data selected in step S140. Then, referring to the information recorded in the time slot information 23 acquired in step S120 that corresponds to the searched task, it obtains the SoC in which the task is executed and its end time as the source and start time of the selected data, respectively. Here, first, the task that outputs the data is identified by searching the task in the task input / output information 21 for a task in which the selected data is listed in the output data column. Then, the SoC, worst execution time, and offset value corresponding to the identified task are obtained from the time slot information 23, and the end time is calculated by adding the offset to the worst execution time. In this way, the SoC in which the task that outputs the selected data is executed and its end time can be determined and obtained as the source and start time of the data.
[0035] In addition, in the task input / output information 21, there may be cases where selected data, such as data 1 or data 3, is not listed in the output data column for any task. In this case, another device that outputs the data to the electronic control unit 100 (e.g., sonar 110, radar 120, camera 130, additional camera 140, or Lidar 150) can be acquired as the source of the data, and the start time for the data can be set to 0 ms. To achieve this, the task input / output information 21 may include information on which device outputs the data for input data that is not listed in the output data column. Alternatively, information representing the source of each data input to the electronic control unit 100 may be pre-set in the task scheduling device 1, and this information may be acquired along with the task input / output information 21.
[0036] In step S160, the communication time candidate determination unit 12 searches the task input / output information 21 for a task that inputs the data selected in step S140. Then, referring to the information recorded in the time slot information 23 obtained in step S120 that corresponds to the searched task, it obtains the SoC in which the task is executed and its start time as the receiving destination and mandatory end time for the selected data, respectively. Here, first, the task that inputs the data is identified by searching the task in the task input / output information 21 for a task in which the selected data is listed in the input data field. Then, the SoC and offset value corresponding to the identified task are obtained from the time slot information 23, and the offset is set as the start time. In this way, the SoC in which the task that inputs the selected data is executed and its start time can be determined and obtained as the receiving destination and mandatory end time for the data.
[0037] In addition, in the task input / output information 21, selected data may be listed in the input data fields for multiple tasks, such as data 1 and data 2. In this case, the processing in step S160 should be executed for each task to obtain the receiving destination and the required completion time. As a result, for example, for data 1, "SoC1" and "10ms" representing the SoC and offset of task A in the time slot information 23, "SoC1" and "10ms" representing the SoC and offset of task B in the time slot information 23, and "SoC2" and "60ms" representing the SoC and offset of task D in the time slot information 23 are obtained as the receiving destination and required completion time for data 1, respectively. Similarly, for example, for data 2, "SoC2" and "40ms" representing the SoC and offset of task C in the time slot information 23, and "SoC2" and "60ms" representing the SoC and offset of task D in the time slot information 23 are obtained as the receiving destination and required completion time for data 2, respectively.
[0038] In step S170, the communication time candidate determination unit 12 aggregates the required completion times acquired for each task in step S160 for each destination SoC. Here, if the data selected in step S140 corresponds to multiple tasks, and the destination and required completion time have been acquired for each task in step S160, if there is a common destination SoC among this acquired information, it is integrated into a single piece of information. At this time, the smallest (earliest) value among the required completion times for each task is set as the combined required completion time. Specifically, for example, for data 1, since the SoC of task A and task B is common to "SoC1", this information is integrated. On the other hand, since the SoC of task D is "SoC2", it is excluded from the integration target. As a result, the combination of "SoC1" and "10ms" and the combination of "SoC2" and "60ms" are acquired as the destination and required completion time for data 1. Furthermore, for example, in the case of data 2, since the SoC of tasks C and D is common to "SoC2", this information is integrated. As a result, the combination of "SoC2" and "60ms" is obtained as the recipient and required completion time for data 2.
[0039] In step S180, the communication time candidate determination unit 12 outputs the information acquired in steps S150 and S160, and further integrated in step S170 as communication time candidate information for the data selected in step S140. After executing step S180, the process returns to step S130 and the above-described process is repeated.
[0040] The communication time candidate determination unit 12 executes the processes in steps S140 to S180 for all data shown in the task input / output information 21, according to the processing flow in Figure 6. This allows the unit to determine the source, destination, possible start time, and required end time for each data related to task execution in SoC 101 and 102, and generate communication time candidate information 24.
[0041] <Communication Time Candidate Information> Figure 7 shows an example of communication time candidate information 24. The communication time candidate determination unit 12 generates communication time candidate information 24, such as that shown in Figure 7, from the task input / output information 21 in Figure 3 and the time slot information 23 in Figure 5. As shown in Figure 7, the communication time candidate information 24 represents the source, destination, possible start time, and required end time of each data as candidates for the communication timing of each data related to the execution of the task. Since data 1 has two destinations (SoC 101 and SoC 102), the communication time candidates are listed separately for each destination. This shows that, for example, when sending data 1 from sensor 1 to SoC 101 to execute tasks A and B, it is possible to send data 1 at the start of the execution cycle of these tasks (0 ms), and the transmission of data 1 must be completed within 10 ms from there. Furthermore, for example, when sending data 2 from SoC101 to SoC102 to execute tasks C and D, it can be seen that 30 ms from the start of the execution cycle of these tasks, the execution of task A, which outputs data 2, will be completed and data 2 will be available for transmission, and the transmission of data 2 must be completed within 10 ms from that point (within 40 ms from the start).
[0042] <Bus Speed Information> FIG. 8 is a diagram showing an example of bus speed information 25. As shown in FIG. 8, the bus speed information 25 has information on the connection destinations (transmission sources, reception destinations) and communication speeds of each communication bus that the electronic control device 100 has. For example, for the bus "PCIe", the transmission source is set to "SoC1", the reception destination is set to "SoC2", and the communication speed is set to "1 Mbps". Thereby, in the electronic control device 100, it can be understood that the type of communication bus connecting between them as a communication path from SoC101 to SoC102 is a PCIe bus, and its communication speed is 1 Mbps.
[0043] <Data Size Information> FIG. 9 is a diagram showing an example of data size information 26. As shown in FIG. 9, the data size information 26 has information on the sizes of each data related to the execution of tasks. For example, the size of data 1 is set to 100 Kb, and the size of data 2 is set to 5 Kb.
[0044] <Communication Required Time Determination Unit> FIG. 10 is a diagram showing the processing flow of the communication required time determination unit 13.
[0045] In step S210, the communication required time determination unit 13 acquires the communication time candidate information 24 generated by the communication time candidate determination unit 12 and stored in the task scheduling device 1.
[0046] In step S220, the communication required time determination unit 13 acquires the bus speed information 25 stored in advance in the task scheduling device 1.
[0047] In step S230, the communication required time determination unit 13 acquires the data size information 26 stored in advance in the task scheduling device 1.
[0048] In step S240, the communication time determination unit 13 determines whether there is any unprocessed data among the respective data represented by the communication time candidate information 24 acquired in step S210. Here, it is determined whether there is any data in the communication time candidate information 24 for which the processing in subsequent steps S250 to S270 has not been executed. If there is, the process proceeds to step S250. On the other hand, if there is no unprocessed data, that is, if the processing in steps S250 to S270 has been executed for all data represented by the communication time candidate information 24 acquired in step S210, the processing flow of FIG. 10 ends.
[0049] In step S250, the communication time determination unit 13 selects any one of the unprocessed data among the respective data represented by the communication time candidate information 24 acquired in step S210. As a result, for example, in the communication time candidate information 24 of FIG. 7, any one of data 1 to data 7 is selected. When the same data is described in different rows in the communication time candidate information 24, the data to be processed is selected in units of those rows. As a result, each data can be selected for each combination of the transmission source and the reception destination.
[0050] In step S260, the communication time determination unit 13 identifies the communication path of the data selected in step S250. Here, the transmission source and the reception destination of the data selected from the communication time candidate information 24 are acquired, and the communication bus that matches these combinations is identified based on the bus speed information 25 acquired in step S220. As a result, for example, "Eth1" is identified as the communication path of data 1 whose transmission source is "Sensor 1" and whose reception destination is "SoC1". Also, for example, "Eth2" is identified as the communication path of data 1 whose transmission source is "Sensor 1" and whose reception destination is "SoC2".
[0051] In step S270, the communication time determination unit 13 calculates the value obtained by dividing the size of the data selected in step S250 by the bus speed of the communication path, and outputs this value as the communication time for the data. Here, the size of the data is identified using the data size information 26 acquired in step S230, and the communication speed of the communication path identified in step S260 is obtained from the bus speed information 25. Then, using these values, the communication time for the data is calculated and output by performing an operation to divide the data size by the communication speed. After executing step S270, the process returns to step S240 and the above process is repeated.
[0052] The communication time determination unit 13 executes the processing steps S250 to S270 for all data shown in the communication time candidate information 24, according to the processing flow in Figure 10. This allows the communication time for each communication path of the data input and output in SoC 101 and 102 to be determined, and communication time information 27 to be generated.
[0053] <Communication Time Information> Figure 11 shows an example of communication time information 27. The communication time determination unit 13 generates communication time information 27, such as that shown in Figure 11, from the communication time candidate information 24 in Figure 7, the bus speed information 25 in Figure 8, and the data size information 26 in Figure 9. As shown in Figure 11, the communication time information 27 represents the type of communication bus used for the communication of each data related to the execution of the task, and the communication time for each data on that communication bus. As mentioned above, data 1 has two receiving destinations (SoC1 and SoC2), and is transmitted using a different communication bus for each receiving destination, so the communication time is recorded for each communication bus.
[0054] <Communication Order Determination Unit> Figure 12 shows the processing flow of the communication order determination unit 14.
[0055] In step S310, the communication sequence determination unit 14 acquires the communication time candidate information 24, which is generated by the communication time candidate determination unit 12 and stored in the task scheduling device 1.
[0056] In step S320, the communication sequence determination unit 14 acquires the communication duration information 27, which is generated by the communication duration determination unit 13 and stored in the task scheduling device 1.
[0057] In step S330, the communication order determination unit 14 determines whether or not there are any unprocessed communication paths among the communication paths represented by the communication time information 27 acquired in step S320. Here, it determines whether or not there are any communication buses corresponding to at least one data in the communication time information 27 that have not yet undergone the processing in steps S340 to S390. If such buses exist, the process proceeds to step S340. On the other hand, if there are no unprocessed communication paths, that is, if the processing in steps S340 to S390 has been completed for all communication buses represented by the communication time information 27 acquired in step S320, the processing flow in Figure 12 is terminated.
[0058] In step S340, the communication sequence determination unit 14 selects one of the unprocessed communication paths represented by the communication time information 27 acquired in step S320. As a result, for example, in the communication time information 27 in Figure 11, one of the communication buses "PCIe", "Eth1", or "Eth2" is selected.
[0059] In step S350, the communication order determination unit 14 determines, based on the communication time information 27 acquired in step S320, whether or not there is any communication data that has not been transmitted incomplete among the communication data corresponding to the communication path selected in step S340. Here, each data corresponding to the selected communication path is acquired from the communication time information 27, and it is determined whether or not all of this data has been determined to have been transmitted successfully through the processing in the subsequent steps S360 to S390. If, as a result, there is communication data that has not been determined to have been transmitted successfully, that is, if there is communication data for which a transmission completion result has not been obtained through the processing in steps S360 to S390, the process proceeds to step S360. On the other hand, if there is no communication data that has not been transmitted successfully, that is, if all of the communication data for the communication path has been determined to have been transmitted successfully, the process returns to step S330.
[0060] In step S360, the communication order determination unit 14 sets the transmission start time. Here, the transmission end time calculated in step S380, which was performed immediately before and will be described later, is set as the data transmission start time for this process.
[0061] In step S370, the communication order determination unit 14 selects the data to be transmitted. Here, among the data corresponding to the communication path selected in step S340 in the communication time information 27, the data whose start time in the communication time candidate information 24 acquired in step S310 is the same as or earlier than the transmission start time set in the preceding step S360, and whose end time is the earliest, is selected as the data to be transmitted.
[0062] In step S380, the communication order determination unit 14 calculates the transmission end time of the data to be transmitted selected in step S370. Here, the unit calculates the transmission start time set in step S360 plus the communication duration of the data as represented by the communication duration information 27, and uses this as the transmission end time. However, if the communication duration of the data is greater than a predetermined communication unit time (for example, 10 ms), the transmission end time is the transmission start time plus the communication unit time.
[0063] In step S390, the communication order determination unit 14 calculates the communication time required for the untransmitted portion of the data to be transmitted, which was selected in step S370. Here, if it was determined in the previous step S380 that the communication time required for the data to be transmitted was greater than the communication unit time, the unit time is subtracted from the communication time, and this value is used as the communication time required for the untransmitted portion of the data to be transmitted. Thereafter, the communication time required for the untransmitted portion calculated here is used as the communication time for the data, and the processing in the next step S380 is carried out. If it was not determined in the previous step S380 that the communication time required for the data to be transmitted was greater than the communication unit time, that is, if all of the data to be transmitted or the untransmitted portion of the data can be transmitted within the communication unit time, the communication time required for the untransmitted portion of the data to be transmitted is set to 0, and the transmission is determined to be complete. After executing step S390, the process returns to step S350 and the above processing is repeated.
[0064] The communication sequence determination unit 14 executes the processing steps S340 to S390 for all data in all communication paths shown in the communication time information 27, according to the processing flow in Figure 12. This determines the communication order of each data input and output to SoC 101 and 102 for each communication path, and generates the communication sequence information 28.
[0065] <Communication Order Information> Figure 13 shows an example of communication order information 28. The communication order determination unit 14 generates communication order information 28, such as that shown in Figure 13, from the communication time candidate information 24 in Figure 7 and the communication time information 27 in Figure 11. As shown in Figure 13, the communication order information 28 represents the transmission order of each data for each communication bus, as well as the start time and end time of transmission. For example, in the PCIe bus connecting SoC 101 and SoC 102, it can be seen that there is no data to transmit during the period from 0ms to 20ms, a part of data 4 is transmitted during the period from 20ms to 30ms, data 2 is transmitted during the following period from 30ms to 35ms, and the remainder of data 4 is transmitted during the following period from 35ms to 65ms.
[0066] According to the first embodiment of the present invention described above, the following effects and advantages can be obtained.
[0067] (1) The task scheduling device 1 is a device that schedules multiple tasks to be executed in an electronic control device 100 having SoCs 101 and 102 as task processing units. The task scheduling device 1 includes a time slot setting unit 11 that sets time slots that define the timing at which SoCs 101 and 102 each execute tasks, a communication time candidate determination unit 12 that finds communication time candidates representing candidate communication timings for multiple data inputs and outputs to SoCs 101 and 102 and creates communication time candidate information 24, a communication time determination unit 13 that finds the communication time required for data communication and generates communication time information 27, and a communication order determination unit 14 that determines the communication order of multiple data based on the communication time candidate information 24 and the communication time information 27. In this task scheduling device 1, the communication time candidate information 24 represents a first time (start time for data 2: 30 ms) when SoC 101, which executes task A, can generate data 2 and send it to SoC 102, and a second time (essential end time for data 2: 40 ms) when SoC 102 needs to acquire data 2 from SoC 101 in order to execute task C or task D. In this way, for an electronic control device 100 having multiple SoCs 101 and 102 as task processing units and performing data communication between each task processing unit, it is possible to determine the data communication order and communication timing so as to adhere to a data flow defined to optimize latency. Therefore, appropriate task scheduling can be achieved for the electronic control device 100.
[0068] (2) The communication time determination unit 13 acquires bus speed information 25 representing the communication speed of the communication bus used for data communication and data size information 26 representing the size of the data (steps S220, S230), and calculates the communication time based on the value obtained by dividing the data size by the communication speed (step S270). In this way, the communication time for each communication path of each data input and output in SoC 101, 102 can be accurately determined.
[0069] (3) The communication order determination unit 14 determines the communication order so that data with a shorter time remaining until the second time (the mandatory completion time) is transmitted first (step S370). In this way, an appropriate communication order can be determined considering the constraints on the execution of tasks in SoC 101 and 102.
[0070] (Second Embodiment) Next, a second embodiment of the present invention will be described. In this embodiment, an example of a task scheduling device capable of evaluating the communication order of each data determined by the communication order determination unit 14 will be described.
[0071] <Configuration of the Task Scheduling Device> Figure 14 is a configuration diagram of a task scheduling device according to a second embodiment of the present invention. The task scheduling device 1A shown in Figure 14 includes, in addition to the components of the task scheduling device 1 shown in Figure 2 described in the first embodiment, a communication delay time evaluation unit 15 and communication delay time evaluation information 29. In the following description, the focus will be on the communication delay time evaluation unit 15 and communication delay time evaluation information 29, which are differences from the first embodiment among the configurations of the task scheduling device 1A shown in Figure 14, and other parts that overlap with the first embodiment will be omitted unless necessary.
[0072] The communication delay time evaluation unit 15 determines the communication delay time for each data in the communication sequence determined by the communication sequence determination unit 14, based on the communication time candidate information 24 and the communication sequence information 28. Then, it evaluates the communication sequence information 28 based on the determined communication delay time and generates communication delay time evaluation information 29 that represents the evaluation result.
[0073] Similar to the first embodiment, the task scheduling device 1A shown in Figure 14 may, for example, be mounted on the electronic control device 100 as a function of the electronic control device 100, or another electronic control device mounted on the vehicle may be used as the task scheduling device 1A. Alternatively, the task scheduling device 1A may be realized using a computer installed in a location separate from the vehicle. The task scheduling device 1A can be realized in any manner as long as it is configured using various computers and the computer executes a predetermined program to operate as the respective functional blocks: the time slot setting unit 11, the communication time candidate determination unit 12, the communication required time determination unit 13, the communication order determination unit 14, and the communication delay time evaluation unit 15.
[0074] <Communication delay time evaluation unit> Figure 15 shows the processing flow of the communication delay time evaluation unit 15.
[0075] In step S410, the communication delay time evaluation unit 15 acquires the communication time candidate information 24 that has been generated by the communication time candidate determination unit 12 and stored in the task scheduling device 1A.
[0076] In step S420, the communication delay time evaluation unit 15 acquires the communication sequence information 28 generated by the communication sequence determination unit 14 and stored in the task scheduling device 1A.
[0077] In step S430, the communication delay time evaluation unit 15 determines whether or not there is any unprocessed data in the communication data of each communication path represented by the communication sequence information 28 acquired in step S420. Here, it determines whether or not there is any data in the communication sequence information 28 that has not yet undergone the processing in the subsequent steps S440 to S470, and if there is, it proceeds to step S440. On the other hand, if there is no unprocessed data, that is, if the processing in steps S440 to S470 has already been performed for all communication paths and all data represented by the communication sequence information 28 acquired in step S420, the processing flow in Figure 15 is terminated.
[0078] In step S440, the communication delay time evaluation unit 15 selects one of the unprocessed data from the communication data of each communication path represented by the communication sequence information 28 acquired in step S420. For example, in the communication sequence information 28 in Figure 13, one of the communication data for each of the "PCIe," "Eth1," and "Eth2" communication buses is selected. If the same data is listed on different communication buses or on different lines in the communication sequence information 28, the selection is made on a communication bus or line-by-line basis. This allows for the selection of each data that is transmitted sequentially for each communication path.
[0079] In step S450, the communication delay time evaluation unit 15 determines whether the transmission end time of the transmission data selected in step S440 is greater than the mandatory end time. Here, it refers to the transmission end time value in the column corresponding to the transmission data selected in step S440 in the communication sequence information 28, and also refers to the mandatory end time value in the column corresponding to the transmission data selected in step S440 in the communication time candidate information 24 acquired in step S410, and compares these values. As a result, if the transmission end time is greater (later) than the mandatory end time, the process proceeds to step S460; otherwise, that is, if the transmission end time is less than or equal to the mandatory end time (same as or earlier than the mandatory end time), the process proceeds to step S470.
[0080] In step S460, the communication delay time evaluation unit 15 calculates the delay time for the transmission data selected in step S440 and outputs this value as the communication delay time evaluation result. Here, the delay time is calculated by subtracting the mandatory end time from the transmission end time referenced in step S450, and the calculation result is output as the communication delay time evaluation result for the selected transmission data.
[0081] In step S470, the communication delay time evaluation unit 15 outputs "no delay" as the evaluation result of the communication delay time for the transmission data selected in step S440. Here, the delay time is 0, and the unit outputs that there is no delay relative to the required end time as the evaluation result of the communication delay time for the selected transmission data.
[0082] After executing step S460 or S470, return to step S430 and repeat the process described above.
[0083] The communication delay time evaluation unit 15 executes the processing of step S460 or S470 for all data shown in the communication sequence information 28, according to the processing flow in Figure 15. This allows the communication delay time of each data input and output in SoC 101 and 102 to be determined, and communication delay time evaluation information 29 to be generated.
[0084] <Communication Delay Time Evaluation Information> Figure 16 shows an example of communication delay time evaluation information 29. The communication delay time evaluation unit 15 generates communication delay time evaluation information 29, such as that shown in Figure 16, from the communication time candidate information 24 in Figure 7 and the communication sequence information 28 in Figure 13. As shown in Figure 16, the communication delay time evaluation information 29 represents the transmission order, transmission start time, and transmission end time of each data for each communication bus, as well as the result of determining the delay relative to the mandatory end time in that communication schedule. For example, in the PCIe bus connecting SoC 101 and SoC 102, data 2 is completed at a timing of 35 ms, and it can be seen that there is no delay relative to the mandatory end time (40 ms) of data 2. On the other hand, data 4 is completed at a timing of 65 ms, and it can be seen that there is a delay of 5 ms relative to the mandatory end time (60 ms) of data 4.
[0085] According to the second embodiment of the present invention described above, the task scheduling device 1A further includes a communication delay time evaluation unit 15 that determines the communication delay time of data in the communication order determined by the communication order determination unit 14 and evaluates the communication order based on the communication delay time (steps S460, S470). In this way, the evaluation of the communication order can be performed while considering to what extent the determined communication order of each data satisfies the constraints for task execution. As a result, if the constraints are satisfied, it is possible to guarantee the real-time performance of the steering 160, accelerator 170, and brake 180 control performed by the electronic control device 100.
[0086] (Third Embodiment) Next, a third embodiment of the present invention will be described. In this embodiment, an example of a task scheduling device that can propose a change in the assignment of tasks to SoC 101 and 102 in the electronic control device 100 using the evaluation result of the communication sequence by the communication delay time evaluation unit 15 will be described.
[0087] <Configuration of the Task Scheduling Device> Figure 17 is a configuration diagram of a task scheduling device according to the third embodiment of the present invention. The task scheduling device 1B shown in Figure 17 includes, in addition to the components of the task scheduling device 1A shown in Figure 14 described in the second embodiment, a communication bus load calculation unit 16, a task execution location change unit 17, communication bus load information 30, and updated time slot information 31. In the following description, the differences between the configuration of the task scheduling device 1B shown in Figure 17 and the first and second embodiments will be explained, focusing on the communication bus load calculation unit 16, the task execution location change unit 17, the communication bus load information 30, and the updated time slot information 31. Other parts that overlap with the first and second embodiments will be omitted unless necessary.
[0088] The communication bus load calculation unit 16 calculates the communication load of each communication bus based on the communication order information 28, assuming that data is transmitted according to the communication order determined by the communication order determination unit 14. It then generates communication bus load information 30 that represents the magnitude of the communication load of each communication bus.
[0089] The task execution location change unit 17 changes the task assignment in the electronic control unit 100 based on the task input / output information 21, time slot information 23, communication sequence information 28, and communication delay time evaluation information 29. Specifically, if the communication delay time evaluation result by the communication delay time evaluation unit 15, represented by the communication delay time evaluation information 29, contains data that will be delayed relative to the required completion time, the execution location in the electronic control unit 100 for the task that outputs that data is assigned to a different SoC. Then, based on the changed task assignment result, the time slot information 23 is updated and updated time slot information 31 is generated. This proposes changing the communication bus used for the communication of the data in question, thereby minimizing communication delays.
[0090] Similar to the first and second embodiments, the task scheduling device 1B shown in Figure 17 may, for example, be mounted on the electronic control device 100 as a function of the electronic control device 100, or another electronic control device mounted on the vehicle may be used as the task scheduling device 1B. Alternatively, the task scheduling device 1B may be realized using a computer installed in a location separate from the vehicle. The task scheduling device 1B can be realized in any manner as long as it is configured using various computers and the computer executes a predetermined program to operate as the respective functional blocks: the time slot setting unit 11, the communication time candidate determination unit 12, the communication required time determination unit 13, the communication order determination unit 14, the communication delay time evaluation unit 15, the communication bus load calculation unit 16, and the task execution location change unit 17.
[0091] <Communication Bus Load Calculation Unit> Figure 18 shows the processing flow of the communication bus load calculation unit 16.
[0092] In step S510, the communication bus load calculation unit 16 acquires the communication sequence information 28 generated by the communication sequence determination unit 14 and stored in the task scheduling device 1B.
[0093] In step S520, the communication bus load calculation unit 16 determines whether there are any unprocessed communication paths among the communication paths represented by the communication sequence information 28 acquired in step S510. Here, it determines whether there are any communication buses among the communication buses for which the transmission start time and transmission end time of at least one transmission data are recorded in the communication sequence information 28 that have not yet undergone the processing in steps S530 to S560. If such buses exist, the process proceeds to step S530. On the other hand, if there are no unprocessed communication paths, that is, if the processing in steps S530 to S560 has been completed for all communication buses represented by the communication sequence information 28 acquired in step S510, the processing flow in Figure 18 is terminated.
[0094] In step S530, the communication bus load calculation unit 16 selects one of the unprocessed communication paths represented by the communication sequence information 28 acquired in step S510. As a result, for example, in the communication sequence information 28 in Figure 13, one of the communication buses "PCIe", "Eth1", or "Eth2" is selected.
[0095] In step S540, the communication bus load calculation unit 16 calculates the transmission and reception time, which represents the time it takes for data to be transmitted and received on the communication path selected in step S530. Here, the transmission and reception time can be calculated by obtaining the time from the start time to the end time of transmission for each data on the selected communication path from the communication sequence information 28 acquired in step S510 and summing these values.
[0096] In step S550, the communication bus load calculation unit 16 calculates the non-transmission / reception time, which represents the time during which no data is transmitted or received on the communication path selected in step S530. Here, the non-transmission / reception time can be calculated by identifying the time during which no data is set to be transmitted on the selected communication path from the communication sequence information 28 acquired in step S510 and summing up that time.
[0097] In step S560, the communication bus load calculation unit 16 calculates the communication bus load for the communication path selected in step S530, based on the transmission / reception time and non-transmission / reception time calculated in steps S540 and S550, respectively. Here, the sum of the transmission / reception time and non-transmission / reception time is calculated, and the transmission / reception time is divided by the calculated sum to determine the ratio of the transmission / reception time to the total available communication time on the communication path, which is then defined as the communication bus load. Alternatively, instead of calculating the sum of the transmission / reception time and non-transmission / reception time, a predetermined communication cycle according to the task execution cycle may be used. In this case, the calculation process for non-transmission / reception time in step S550 may be omitted.
[0098] The communication bus load calculation unit 16 performs the processing steps S530 to S560 for all communication paths shown in the communication sequence information 28, according to the processing flow in Figure 18. This allows the load of the communication bus used for the communication of each data input and output to the SoC 101 and 102 to be determined, and the communication bus load information 30 to be generated.
[0099] <Communication Bus Load Information> Figure 19 shows an example of communication bus load information 30. The communication bus load calculation unit 16 generates communication bus load information 30, such as that shown in Figure 19, from the communication sequence information 28 in Figure 13. As shown in Figure 19, the communication bus load information 30 represents the transmission / reception time, non-transmission / reception time, and communication load for each communication bus. For example, in the PCIe bus connecting SoC 101 and SoC 102, the non-transmission / reception time is 20 ms and the transmission / reception time is 45 ms. Furthermore, the percentage obtained by dividing the transmission / reception time by the sum of these is 69.2%, and this value corresponds to the communication load of the PCIe bus.
[0100] <Task Execution Location Change Section> Figure 20 is a diagram showing the processing flow of the task execution location change section 17.
[0101] In step S610, the task execution location change unit 17 acquires task input / output information 21 that is pre-stored in the task scheduling device 1B.
[0102] In step S620, the task execution location change unit 17 acquires the time slot information 23 that has been generated by the time slot setting unit 11 and stored in the task scheduling device 1B.
[0103] In step S630, the task execution location change unit 17 acquires the communication sequence information 28 that has been generated by the communication sequence determination unit 14 and stored in the task scheduling device 1B.
[0104] In step S640, the task execution location change unit 17 acquires the communication delay time evaluation information 29, which is generated by the communication delay time evaluation unit 15 and stored in the task scheduling device 1B.
[0105] In step S650, the task execution location change unit 17 extracts data experiencing a communication delay and data transmitted before that data from the communication delay time evaluation information 29 acquired in step S640. For example, in the communication delay time evaluation information 29 in Figure 16, data 4 is experiencing a delay on the PCIe bus. Therefore, data 4 and data 2 transmitted before it are extracted for the PCIe bus. Similarly, for other communication paths, data experiencing a communication delay and data transmitted before that data are extracted for that communication path. If there is no data experiencing a delay, that is, if the judgment result for all transmitted data in the communication delay time evaluation information 29 is "no delay", then no data is extracted for that communication path.
[0106] In step S660, the task execution location change unit 17 calculates the combination of tasks to be executed on a different SoC (another SoC) than the one specified in the current time slot setting (hereinafter referred to as the "first combination") when the task that generates each of the data extracted in step S650 is executed on a different SoC. Here, the unit first refers to the task input / output information 21 and time slot information 23 acquired in steps S610 and S620, respectively, to identify which SoC will execute the task that outputs each of the extracted data in the current time slot setting. Then, it calculates the combination of tasks to be executed on the other SoC when using a different SoC than this one, as the first combination. The number of first combinations calculated at this time is equal to the square of the number of extracted data minus 1.
[0107] Specifically, consider the case in step S650 where, as mentioned above, data 2 and data 4 are extracted for the PCIe bus from the communication delay time evaluation information 29 in Figure 16. In this case, from the task input / output information 21 in Figure 3 and the time slot information 23 in Figure 5, it can be seen that, with the current time slot setting, both task A, which outputs data 2, and task B, which outputs data 4, are executed on SoC 101. Therefore, in step S660, the following three combinations are calculated as the first combination: (1) Execute both task A and task B on another SoC (SoC 102) (2) Execute task A on another SoC (SoC 102) and task B on the same SoC (SoC 101) as the current time slot setting (3) Execute task A on the same SoC (SoC 101) as the current time slot setting and task B on another SoC (SoC 102)
[0108] In step S670, the task execution location change unit 17 determines whether there are any unprocessed tasks among the first combinations calculated in step S660. Here, it determines whether there are any task combinations to be executed by other SoCs that were calculated as the first combination in step S660 that have not yet undergone the processing in steps S680 to S740. If there are, the process proceeds to step S680. On the other hand, if there are no unprocessed first combinations, that is, if the processing in steps S680 to S740 has been completed for all of the first combinations calculated in step S660, the processing flow in Figure 20 is terminated.
[0109] In step S680, the task execution location change unit 17 selects one of the unprocessed combinations from the first combination calculated in step S660.
[0110] In step S690, the task execution location change unit 17 identifies other SoCs capable of executing each task that is executed by another SoC in the first combination selected in step S680. Specifically, for example, in the first combination example described above, in case (1), SoC 102 is identified as another SoC capable of executing tasks A and B. Also, in case (2), SoC 102 is identified as another SoC capable of executing task A, and in case (3), SoC 102 is identified as another SoC capable of executing task B. At this time, if multiple SoCs are available as other SoCs in addition to the SoC in the current time slot setting, these SoCs are identified as SoCs capable of executing tasks.
[0111] In step S700, the task execution location change unit 17 calculates combinations of each SoC identified in step S690 and the tasks executed by that SoC (hereinafter referred to as "second combinations") for the first combination selected in step S680. As a result, if there are multiple other SoCs, multiple second combinations are calculated according to the number of combinations of these SoCs and the tasks they execute. In this case, if there is only one other SoC, the same combination as the first combination selected in step S680 is calculated as the second combination in step S700.
[0112] In step S710, the task execution location change unit 17 determines whether there are any unprocessed combinations among the second combinations calculated in step S700. Here, it determines whether there are any combinations of SoC and tasks calculated as the second combination in step S700 that have not yet undergone the processing in steps S720 to S740. If there are, the process proceeds to step S720. On the other hand, if there are no unprocessed second combinations, that is, if the processing in steps S720 to S740 has already been performed for all of the second combinations calculated in step S700 with respect to the first combination selected in step S680, the process returns to step S670.
[0113] In step S720, the task execution location change unit 17 selects one of the unprocessed second combinations calculated in step S700. At this time, it may also refer to the communication bus load information 30 and decide which of the second combinations to select preferentially so that more transmission data flows to the communication path with the lightest communication load.
[0114] In step S730, the task execution location change unit 17 updates the combination of a task and the SoC that executes it according to the second combination selected in step S720, and performs task scheduling in that state. Here, the contents of the task input / output information 21 are updated according to the selected second combination, and the time slot setting unit 11 generates time slot information 23 for the updated task input / output information 21. Using this time slot information 23, the communication time candidate determination unit 12, the communication required time determination unit 13, the communication order determination unit 14, and the communication delay time evaluation unit 15 each perform the processing described above. As a result, the communication delay status in each communication path when the selected second combination is adopted is reflected in the communication delay time evaluation information 29 generated by the communication delay time evaluation unit 15.
[0115] In step S740, the task execution location change unit 17 refers to the communication delay time evaluation information 29 obtained in step S730 and determines whether or not there is a communication path where a delay occurs. If there is a communication path where a delay occurs, the unit returns to step S710; otherwise, it proceeds to step S750.
[0116] In step S750, the task execution location change unit 17 outputs the time slot information 23 generated in step S730 for the second combination selected in step S720 as updated time slot information 31.
[0117] The task execution location change unit 17, following the processing flow in Figure 20, performs task scheduling while changing task assignments until a combination of task and SoC that does not cause delays in transmitted data is found. This generates updated time slot information 31 to prevent delays in transmitted data, and this updated time slot information 31 can be used to propose changes to task assignments.
[0118] Furthermore, if the processing flow shown in Figure 20 is executed for all possible combinations of SoC and tasks in the electronic control unit 100, it may be determined in step S740 that a communication path exists that causes a delay in transmitted data for all of them, and in such cases, the processing in step S750 may not be performed and the updated time slot information 31 may not be output. In such cases, the combination with the least delay may be selected, and the time slot information 23 for that combination may be output as the updated time slot information 31.
[0119] According to the third embodiment of the present invention described above, the task scheduling device 1B further includes a task execution location changing unit 17 that changes the SoC that executes at least one of the multiple tasks (steps S660, S700) based on communication delay time evaluation information 29 representing the evaluation result of the communication order by the communication delay time evaluation unit 15. In this way, if a delay in transmitted data occurs when assigning tasks to each predetermined SoC, it becomes possible to change the task assignment so that the delay in transmitted data does not occur as much as possible.
[0120] Furthermore, according to the third embodiment of the present invention described above, the task scheduling device 1B further includes a communication bus load calculation unit 16 that calculates the data transmission and reception time and the non-transmission and reception time on the communication bus used for data communication based on the communication sequence information 28 representing the communication sequence determined by the communication sequence determination unit 14 (steps S540, S550), and calculates the load on the communication bus by dividing the sum of the transmission and reception times by the sum of the transmission and reception times and the non-transmission and reception times (step S560). In this way, the communication load on each communication path can be accurately determined. Furthermore, when changing the assignment of tasks to each SoC in the task execution location change unit 17, it is also possible to consider the communication load on each communication path.
[0121] It should be noted that the present invention is not limited to the embodiments described above, and various modifications are included. For example, each of the embodiments described above is described in detail for the purpose of clearly illustrating the present invention, and is not necessarily limited to having all of the described configurations. Furthermore, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. In addition, it is possible to add, delete, or replace parts of the configuration of each embodiment with other configurations.
[0122] Furthermore, each of the above configurations, functions, processing units, processing means, etc., may be implemented in hardware, either partially or entirely, by designing them as integrated circuits, for example. Alternatively, each of the above configurations, functions, etc., may be implemented in software by having the processor interpret and execute programs that realize each of these functions.
[0123] Furthermore, the present invention is not limited to the embodiments described above, and various modifications are possible without departing from the spirit of the invention.
[0124] 1, 1A, 1B: Task scheduling device 11: Time slot setting unit 12: Communication time candidate determination unit 13: Communication required time determination unit 14: Communication order determination unit 15: Communication delay time evaluation unit 16: Communication bus load calculation unit 17: Task execution location change unit 21: Task input / output information 22: Task execution information 23: Time slot information 24: Communication time candidate information 25: Bus speed information 26: Data size information 27: Communication required time information 28: Communication order information 29: Communication delay time evaluation information 30: Communication bus load information 31: Updated time slot information 100: Electronic control unit 101, 102: SoC
Claims
1. A task scheduling device for scheduling multiple tasks to be performed in an electronic control unit having multiple task processing units, comprising: a time slot setting unit that sets time slots that define the timing at which each task processing unit executes each task; a communication time candidate determination unit that finds communication time candidates representing candidate communication timings for multiple data to be input and output to each task processing unit; a communication time determination unit that finds the communication time required for the communication of the data; and a communication order determination unit that determines the communication order of the multiple data based on the communication time candidates and the communication time, wherein the tasks include a first task and a second task; the task processing unit includes a first task processing unit that executes the first task and generates the data; and a second task processing unit that executes the second task using the data generated by the first task processing unit; and the communication time candidates include a first time at which the first task processing unit can generate the data and transmit it to the second task processing unit, and a second time at which the second task processing unit needs to acquire the data from the first task processing unit in order to execute the second task.
2. A task scheduling device according to claim 1, comprising a communication delay time evaluation unit that determines the communication delay time of the data in the communication order determined by the communication order determination unit and evaluates the communication order based on the communication delay time.
3. A task scheduling device according to claim 2, comprising a task execution location changing unit that changes the task processing unit which executes at least one of the plurality of tasks based on the evaluation result of the communication order by the communication delay time evaluation unit.
4. A task scheduling device according to claim 1, wherein the communication time determination unit acquires bus speed information representing the communication speed of a communication bus used for data communication and data size information representing the size of the data, and determines the communication time based on the value obtained by dividing the size of the data by the communication speed.
5. A task scheduling device according to claim 1, wherein the communication order determination unit determines the communication order so that data with a shorter time until the second time is transmitted first.
6. A task scheduling device according to claim 1, comprising a communication bus load calculation unit that calculates the data transmission and reception time and non-transmission and reception time on the communication bus used for data communication based on the communication order determined by the communication order determination unit, and calculates the load on the communication bus by dividing the sum of the transmission and reception times by the sum of the transmission and reception times and non-transmission and reception times.
7. A task scheduling method performed by a computer for scheduling a plurality of tasks to be performed in an electronic control device having a plurality of task processing units, the method comprising: setting time slots that define the timing at which each task processing unit executes each task; determining communication time candidates that represent candidate communication timings for a plurality of data to be input and output to each task processing unit; determining the communication time required for the communication of the data; determining the communication order of the plurality of data based on the communication time candidates and the communication time; the plurality of tasks include a first task and a second task; the plurality of task processing units include a first task processing unit that executes the first task and generates the data; and a second task processing unit that executes the second task using the data generated by the first task processing unit; and the communication time candidates include a first time at which the first task processing unit can generate the data and transmit it to the second task processing unit, and a second time at which the second task processing unit needs to acquire the data from the first task processing unit in order to execute the second task.
Citation Information
Patent Citations
Task arrangement method, device and equipment and computer readable storage medium
CN118607805A
Device, method and program for switching task
JP2004280297A
Relay program and electronic control device
JP2011028559A
Scheduling method and scheduling design assistance device
WO2023276075A1
Electronic control device, vehicle control system, and task control method
WO2024070015A1