Task scheduling device, 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 and improving task allocation and latency.

JP2026058863APending Publication Date: 2026-04-06ASTEMO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-04-06

Smart Images

  • Figure 2026058863000001_ABST
    Figure 2026058863000001_ABST
Patent Text Reader

Abstract

This invention provides appropriate task scheduling for an electronic control device that has multiple task processing units and communicates data between them. [Solution] The task scheduling device 1 includes a time slot setting unit 11 that sets time slots that define the timing at which multiple task processing units each execute a task, a communication time candidate determination unit 12 that finds communication time candidates representing candidate communication timings for multiple data input and output to multiple task processing units 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0005]

[0001] The present invention relates to an apparatus and method for scheduling when an electronic control device executes tasks.

Background Art

[0002] In an electronic control device mounted on an automobile or the like, a desired function is realized by executing various arithmetic processes (tasks) at a predetermined cycle. In recent years, in order to improve the processing ability of the electronic control device, the use of an electronic control device employing a multi-core has been on the rise. When using such a multi-core type electronic control device, by appropriately performing task scheduling in advance and determining which task is to be executed 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 the 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 employing a multi-core, it becomes possible to realize more efficient task allocation.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] The electronic control device described in Patent Document 1 predicts the execution time of a task based on the task's features. However, while this method can predict the execution time of each individual task, it cannot accurately predict the total processing time when tasks work together. Furthermore, Patent Document 1 assumes an electronic control device employing a multicore architecture, but it does not cover electronic control devices with a multi-chip configuration having multiple SoCs (System on a Chip), and therefore does not consider data communication between SoCs.

[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. [Means for solving the problem]

[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. [Effects of the Invention]

[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. [Brief explanation of the drawing]

[0009] [Figure 1] This figure shows an example 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. [Figure 2] This is a configuration diagram of a task scheduling device according to the first embodiment of the present invention. [Figure 3] This figure shows an example of task input / output information. [Figure 4]This is a diagram showing an example of task execution information. [Figure 5] This is a diagram showing an example of time slot setting information. [Figure 6] This is a diagram showing the processing flow of the communication time candidate determination unit. [Figure 7] This is a diagram showing an example of communication time candidate information. [Figure 8] This is a diagram showing an example of bus speed information. [Figure 9] This is a diagram showing an example of data size information. [Figure 10] This is a diagram showing the processing flow of the communication required time determination unit. [Figure 11] This is a diagram showing an example of communication required time information. [Figure 12] This is a diagram showing the processing flow of the communication order determination unit. [Figure 13] This is a diagram showing an example of communication order information. [Figure 14] This is a configuration diagram of a task scheduling device according to the second embodiment of the present invention. [Figure 15] This is a diagram showing the processing flow of the communication delay time evaluation unit. [Figure 16] This is a diagram showing an example of communication delay time evaluation information. [Figure 17] This is a configuration diagram of a task scheduling device according to the third embodiment of the present invention. [Figure 18] This is a diagram showing the processing flow of the communication bus load calculation unit. [Figure 19] This is a diagram showing an example of communication bus load information. [Figure 20] This is a diagram showing the processing flow of the task execution location change unit.

Modes for Carrying Out the Invention

[0010] Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following description and drawings are examples for explaining the present invention, and for the sake of clarity of explanation, appropriate omissions and simplifications have been made. The present invention can be implemented in various other forms. Unless otherwise particularly limited, each component may be singular or plural.

[0011] In the drawings, the positions, sizes, shapes, ranges, etc. of each component shown may not represent the actual positions, sizes, shapes, ranges, etc. in order to facilitate understanding of the invention. For this reason, the present invention is not necessarily limited to the positions, sizes, shapes, ranges, etc. disclosed in the drawings.

[0012] <Configuration of Vehicle Control Device> FIG. 1 is a diagram showing a configuration example of an electronic control device to be task-scheduled by a task scheduling device according to an embodiment of the present invention. The electronic control device 100 shown in FIG. 1 is an ECU (Electronic Control Unit) mounted on and used in a vehicle such as an automobile, and has a plurality of SoCs 101 and 102.

[0013] Transmitted data from various other devices mounted on the vehicle is input to the SoCs 101 and 102, respectively. For example, data transmitted from the sonar 110, radar 120, and camera 130 and received by the electronic control device 100 is input to the SoC 102. Also, data transmitted from the additional camera 140 and Lidar (Light Detection and Ranging) 150 and received by the electronic control device 100 is input to the 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 along 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 sonar 110, radar 120, camera 130, additional camera 140, and Lidar 150 sensors, 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 can be considered in which the types and number of sensors, the number of SoCs, etc. are increased or decreased compared to the configuration in Figure 1. 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 represents the data input and output to SoC101 and 102 respectively when SoC101 and 102 execute a task, on a task-by-task basis. Task execution information 22 represents the time required for SoC101 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 SoC101 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 settings. A time slot defines the timing at which SoC101 and 102 will execute each task. Details of how the time slot setting unit 11 sets 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 on 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, including candidate timings for when each data used for task execution on SoC 101 and 102 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 by which the communication time determination unit 13 calculates the communication time will be described later.

[0021] The communication order determination unit 14 determines the communication order of each data related to task execution on 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 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. The 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 at least the worst-case execution time, and data corresponding to the execution result of the task will be output.

[0025] <Time Slot Setting Section> 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, a known task scheduling method such as LET (Logical Execution Time) is used to determine the SoC, core, and offset values ​​to be assigned to each task, so that all tasks satisfy the input / output relationships of the data represented by the task input / output information 21 in Figure 3, and the execution period and worst-case execution time represented by the task execution information 22 in Figure 4, thereby setting the time slot for each task.

[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 20ms and the worst execution time of task B is 10ms. Therefore, if they are executed on different cores, task C must be executed 20ms or later from the start of the execution cycle, and if they are executed on the same core, task C must be executed 30ms 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 can be 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, task C can be executed in a way that reliably reflects their execution results, thus guaranteeing that the same execution results 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 SoC101, 10ms after the start of each execution cycle (100ms). Similarly, 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 SoC102, 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 ends.

[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 obtained 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 0ms. 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 the required 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. This makes it possible to determine the SoC in which the task that inputs the selected data is executed and its start time, and to obtain the receiving destination and the required 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 receiving SoC. Here, if the data selected in step S140 corresponds to multiple tasks, and the receiving destination and required completion time are acquired for each task in step S160, if there is any receiving SoC common to any of 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. As a result, the combination of "SoC1" and "10ms" and the combination of "SoC2" and "60ms" are acquired as the receiving destination and required completion time for data 1. Also, for example, for data 2, since the SoC of task C and task D is common to "SoC2", this information is integrated. This results in the acquisition of the combination of "SoC2" and "60ms" as the destination and required end 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 processing 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 on SoC 101 and 102, and generate communication time candidate information 24.

[0041] <Candidate communication time 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 for each data, as candidates for the communication timing of each data related to the execution of the task. Since data 1 has two destinations (SoC101 and SoC102), the communication time candidates are listed separately for each destination. This shows that, for example, when sending data 1 from sensor 1 to SoC101 to execute tasks A and B, it is possible to send data 1 at the start of the execution cycle of these tasks (0ms), and the transmission of data 1 must be completed within 10ms from there. Furthermore, for example, when sending data 2 from SoC101 to SoC102 to execute tasks C and D, it can be seen that 30ms after the start of the execution cycle of these tasks, the execution of task A, which outputs data 2, will have finished and data 2 will be available for transmission, and the transmission of data 2 must be completed within 10ms from that point (within 40ms from the start).

[0042] <Bus speed information> Figure 8 shows an example of bus speed information 25. As shown in Figure 8, the bus speed information 25 contains information about the connection destination (source, destination) and communication speed of each communication bus owned by the electronic control unit 100. For example, for bus "PCIe", the source is set to "SoC1", the destination to "SoC2", and the communication speed to "1Mbps". From this, it can be seen that in the electronic control unit 100, the type of communication bus connecting SoC101 and SoC102 as a communication path is a PCIe bus, and its communication speed is 1Mbps.

[0043] <Data size information> Figure 9 shows an example of data size information 26. As shown in Figure 9, data size information 26 contains information about the size of each data related to the execution of the task. For example, the size of data 1 is set to 100Kb, and the size of data 2 is set to 5Kb.

[0044] <Communication Time Determination Unit> Figure 10 shows the processing flow of the communication time determination unit 13.

[0045] In step S210, the communication time determination unit 13 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 1.

[0046] In step S220, the communication time determination unit 13 acquires bus speed information 25 that is pre-stored in the task scheduling device 1.

[0047] In step S230, the communication time determination unit 13 acquires data size information 26 that is pre-stored in the task scheduling device 1.

[0048] In step S240, the communication time determination unit 13 determines whether or not there is any unprocessed data among the data represented by the communication time candidate information 24 acquired in step S210. Here, it determines whether or not there is any data in the communication time candidate information 24 that has not yet undergone the processing in the subsequent steps S250 to S270, and if there is, it 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 already been performed for all the data represented by the communication time candidate information 24 acquired in step S210, the processing flow in Figure 10 is terminated.

[0049] In step S250, the communication time determination unit 13 selects one of the unprocessed data from among the data represented by the communication time candidate information 24 acquired in step S210. For example, in the communication time candidate information 24 shown in Figure 7, one of data 1 to 7 is selected. If the same data is listed on different lines in the communication time candidate information 24, the data to be processed is selected on a line-by-line basis. This allows for the selection of each data for each combination of sender and receiver.

[0050] In step S260, the communication time determination unit 13 identifies the communication path for the data selected in step S250. Here, it obtains the source and destination of the data selected from the communication time candidate information 24, and identifies the communication bus that matches these combinations using the bus speed information 25 obtained in step S220. As a result, for example, "Eth1" is identified as the communication path for data 1 whose source is "sensor 1" and destination is "SoC1". Also, for example, "Eth2" is identified as the communication path for data 1 whose source is "sensor 1" and 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 the operation of dividing 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 listed for each communication bus.

[0054] <Communication Order Determination Unit> Figure 12 shows the processing flow of the communication sequence determination unit 14.

[0055] In step S310, the communication sequence determination unit 14 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 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 sequence determination unit 14 determines whether 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 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 there are, 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 sequence 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 route selected in step S340. Here, each piece of data corresponding to the selected communication route 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 route 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 (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 mandatory 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, it 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 value obtained by adding the communication unit time to the transmission start 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 the SoC 101 and 102 for each communication path, and generates the communication sequence information 28.

[0065] <Communication sequence information> Figure 13 shows an example of communication sequence information 28. The communication sequence determination unit 14 generates communication sequence 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 sequence information 28 represents the transmission order of each data for each communication bus, as well as the start and end times of transmission. For example, in the PCIe bus connecting SoC101 and SoC102, it can be seen that no data is transmitted during the period from 0ms to 20ms, a portion 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 by an electronic control unit 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: 30ms) 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: 40ms) 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 that has multiple SoCs 101 and 102 as task processing units and performs 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 and 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 while taking into account the constraints on task execution in SoC101 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 Department> 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, which is 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 that has been 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 shown 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 obtained 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, i.e., 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, it outputs that the delay time is 0, and 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 performs the processing in 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 for each data input and output at 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 SoC101 and SoC102, data 2 is transmitted at a timing of 35ms, and it can be seen that there is no delay relative to the mandatory end time (40ms) for data 2. On the other hand, data 4 is transmitted at a timing of 65ms, and it can be seen that there is a delay of 5ms relative to the mandatory end time (60ms) for 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 that 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 task assignment 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 a 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, which was 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 focus will be 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, which are differences from the first and second embodiments of the task scheduling device 1B shown in Figure 17. 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 representing the magnitude of the calculated communication load for 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 SoC101 and SoC102, the non-transmission / reception time is 20ms and the transmission / reception time is 45ms. 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 shows the processing flow of the task execution location change unit 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 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 communication delays 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, which is transmitted before it, are extracted for the PCIe bus. Similarly, for other communication paths, data experiencing communication delays and data transmitted before that data are extracted for that communication path. If there is no data experiencing delays, 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 SoC specified in the current time slot setting for the task that generates each of the data extracted in step S650 (hereinafter referred to as the "first combination"). Here, it first refers to the task input / output information 21 and time slot information 23 obtained 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 to 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 SoC101. 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 (SoC102) (2) Task A is executed on another SoC (SoC102), and Task B is executed on the same SoC (SoC101) as the current time slot setting. (3) Task A will run on the same SoC (SoC101) as the current time slot setting, and Task B will run on a different SoC (SoC102).

[0108] In step S670, the task execution location change unit 17 determines whether there are any unprocessed items among the first combinations calculated in step S660. Here, it determines whether there are any task combinations to be executed on 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, it 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 on other SoCs in the first combination selected in step S680. Specifically, for example, in the first combination example described above, in case (1), SoC102 is identified as another SoC capable of executing tasks A and B. Also, in case (2), SoC102 is identified as another SoC capable of executing task A, and in case (3), SoC102 is identified as another SoC capable of executing task B. At this time, if multiple SoCs other than the SoC in the current time slot setting are available, 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 on 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 SoC and task combinations 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 delay occurs. If there is a communication path where 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 if a delay occurs in the transmitted data, until a combination of task and SoC that does not cause a delay 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 SoCs 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 order information 28 representing the communication order determined by the communication order determination unit 14 (steps S540, S550), and determines 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. [Explanation of symbols]

[0124] 1,1A,1B: Task scheduling device 11: Time slot setting section 12: Communication time candidate determination unit 13: Communication 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 section 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 time information 28: Communication sequence 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 that schedules multiple tasks to be executed in an electronic control unit having multiple task processing units, A time slot setting unit sets time slots that define the timing at which the task processing unit will execute each of the tasks, A communication time candidate determination unit that determines communication time candidates representing candidate communication timings for multiple data input and output to the task processing unit, A communication time determination unit that determines the communication time required for the transmission of the aforementioned data, The system includes a communication order determination unit that determines the communication order of a plurality of data based on the candidate communication time and the required communication time, The aforementioned task includes 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. The candidate communication time includes a first time when the first task processing unit can generate the data and send it to the second task processing unit, and a second time when the second task processing unit needs to obtain the data from the first task processing unit in order to execute the second task. Task scheduling device.

2. A task scheduling device according to claim 1, The system includes a communication delay time evaluation unit that determines the communication delay time of the data in the communication sequence determined by the communication sequence determination unit and evaluates the communication sequence based on the communication delay time. Task scheduling device.

3. A task scheduling device according to claim 2, The task execution location modification unit modifies the task processing unit that executes at least one of the multiple tasks based on the evaluation result of the communication order by the communication delay time evaluation unit. Task scheduling device.

4. A task scheduling device according to claim 1, The communication time determination unit acquires bus speed information representing the communication speed of the 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 data size by the communication speed. Task scheduling device.

5. A task scheduling device according to claim 1, The communication order determination unit determines the communication order so that data with a shorter time until the second time is transmitted first. Task scheduling device.

6. A task scheduling device according to claim 1, A communication bus load calculation unit calculates the load on the communication bus by determining the communication order based on the communication order determined by the communication order determination unit, calculating the data transmission and reception time on the communication bus used for data communication and the non-transmission and reception time on the communication bus when no data is transmitted or received, and dividing the sum of the transmission and reception times by the sum of the transmission and reception times and the non-transmission and reception time. Task scheduling device.

7. A task scheduling method performed by a computer for scheduling multiple tasks to be executed in an electronic control unit having multiple task processing units, The computer sets time slots that define the timing at which the task processing unit will execute each of the tasks. The computer obtains communication time candidates, which represent candidate communication timings for multiple data that are input and output to the task processing unit. The computer determines the communication time required for the transmission of the data. The computer determines the communication order of the multiple data based on the candidate communication time and the required communication time. The aforementioned 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. The candidate communication time includes a first time when the first task processing unit can generate the data and send it to the second task processing unit, and a second time when the second task processing unit needs to obtain the data from the first task processing unit in order to execute the second task. Task scheduling methods.

Citation Information

Patent Citations

  • Electronic control device

    JP2019125093A