Electronic control unit, vehicle control system, and task control method

The electronic control device's time slot allocation system enables seamless integration of new tasks into vehicle control software without disrupting existing operations, ensuring continuous improvement and reliable data communication.

JP7883418B2Active Publication Date: 2026-07-01ASTEMO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
ASTEMO LTD
Filing Date
2022-09-27
Publication Date
2026-07-01

AI Technical Summary

Technical Problem

Existing vehicle control software scheduling methods require costly redesign and verification when updated, leading to potential variations in task processing timing and data communication issues.

Method used

An electronic control device with a time slot allocation system that manages task execution timing and data flow, allowing new tasks to be added without affecting existing tasks, using a time slot allocation unit that searches for available slots based on data flow and request information.

Benefits of technology

Ensures continuous improvement of vehicle control software by eliminating the need for redesign and verification, maintaining real-time task execution and data communication integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007883418000001
    Figure 0007883418000001
  • Figure 0007883418000002
    Figure 0007883418000002
  • Figure 0007883418000003
    Figure 0007883418000003
Patent Text Reader

Abstract

To provide scheduling of tasks, which can ensure that processing results do not change between before and after modification of vehicle control software with respect to existing tasks.SOLUTION: In an electronic control device, a time slot allocation unit is configured to: receive inputs of information of a task which generates data to be inputted to a new task, data flow request information including information indicating how many cycles by which a cycle precedes a time slot at which the new task is to be started, wherein data generated by the task in this cycle is to be used, and time slot request information including information of the number of time slots required for execution of the new task; search for an idle time slot for execution of the new task on the basis of time slot allocation information, the data flow request information, and the time slot request information; and update the time slot allocation information so as to allocate the new task to the searched idle time slot.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electronic control device and a vehicle control system.

Background Art

[0002] With the advancement and complexity of vehicle control such as autonomous driving, continuous improvement of vehicle control software is required. Vehicle control software requires real-time performance, and each task needs to complete processing by a predetermined deadline. However, performing task scheduling every time the vehicle control software is changed requires costs for its design and verification, which has become a bottleneck in the continuous improvement of vehicle control software.

[0003] As a task scheduling technique, there is a technique described in JP-A-2012-181852 (Patent Document 1). This publication aims to provide a scheduling method for processing tasks that can effectively use resources, which is particularly suitable for use in the field of on-board electronics. As a solution, the processing of a task includes a step of setting resources required for the execution of the task and a step of executing the task on the set resources. In scheduling, it includes a step of selecting at least one task level to be processed and a step of determining the priority of task processing according to the number of resources required for task processing and the characteristic time of the task by sorting tasks based on the task level to be processed according to the priority.

[0004] Furthermore, according to Japanese Patent Publication No. 2009-80820 (Patent Document 2), the objective is to provide a task switching device that facilitates program design by specifying priorities to satisfy the needs and capabilities of each task, and has flexibility in program design. As a solution, the task switching device switches the execution of tasks assigned to time slots by switching time slots in a processor, comprising: time slot information storage means that stores the allocation time of each of a plurality of first type tasks having a pointer that associates a task with a time slot and a specification of the allocation time; task storage means that stores the priority of each of a plurality of second type tasks having a priority; and for a plurality of time slots within one cycle, each of the plurality of first type tasks is assigned one task based on the pointer. The invention describes an assignment means that assigns a plurality of tasks of the second type to one time slot in a one-to-one time slot configuration and assigns them to a specific time slot in a multi-task-to-one time slot configuration where no tasks of the first type are assigned, based on the pointer; a time slot switching means that switches time slots based on the assigned time for each of the plurality of tasks of the first type stored in the time slot information storage means; and a task selection means that, when switched to a time slot other than the specific time slot, selects a task assigned to that time slot, and when switched to the specific time slot, selects one task from a plurality of tasks of the second type based on the priority stored in the task storage means. [Prior art documents] [Patent Documents]

[0005] [Patent Document 1] Japanese Patent Publication No. 2012-181852 [Patent Document 2] Japanese Patent Publication No. 2009-80820 [Overview of the project] [Problems that the invention aims to solve]

[0006] According to Patent Document 1, resources can be used efficiently by sorting tasks and allocating resources based on the amount of CPU (Central Processing Unit) resources required for each task's execution, as well as characteristic values ​​calculated based on remaining time and priority group. However, sorting causes variations in the timing at which each task is processed by the CPU, so updating the vehicle control software may cause variations in the processing timing of each task. This could affect data communication between tasks and communication with the Electronic Control Unit (ECU) and its external systems. Therefore, it is necessary to verify that changes to the vehicle control software do not affect communication.

[0007] According to Patent Document 2, the time slots are divided into two types, with tasks assigned one-to-one to the first time slot and many-to-one to the second time slot, thereby simplifying priority design. However, the scheduling of the second time slot in particular may change due to changes in the vehicle control software, and verification is necessary, similar to Patent Document 1.

[0008] Based on the above, the present invention aims to minimize the need for real-time task scheduling design and verification when vehicle control software is changed, and addresses the challenge of providing task scheduling that guarantees no change in processing results for existing tasks before and after changes to the vehicle control software. [Means for solving the problem]

[0009] To solve the aforementioned problems, a representative example of the invention disclosed in this application is as follows: an electronic control device comprising: an arithmetic unit that performs predetermined arithmetic processing and periodically executes tasks; a storage device accessible by the arithmetic unit, wherein the timing of data input and data output of the tasks is predetermined; a time slot allocation information storage unit that stores time slot allocation information defining the execution timing of the tasks between the predetermined data input timing and data output timing; a task startup unit that starts the tasks according to the time slot allocation information; and a time slot allocation unit that stores information of a new task in the time slot allocation information storage unit according to the execution timing of the new task. An electronic control device characterized in that the imslot allocation unit receives input including data flow request information which includes information about the task that generates the data to be input to the new task, information which includes data generated by the task several cycles prior to the time slot in which the new task is launched, and time slot request information which includes information on the number of time slots required to execute the new task, searches for an available time slot to execute the new task based on the time slot allocation information, the data flow request information, and the time slot request information, and updates the time slot allocation information to allocate the new task to the found available time slot. [Effects of the Invention]

[0010] According to one aspect of the present invention, even when a new task is added to the electronic control unit, timing design and verification become unnecessary, enabling continuous improvement of vehicle control software. Problems, configurations, and effects other than those described above will be clarified by the following description of the embodiments. [Brief explanation of the drawing]

[0011] [Figure 1] This figure shows the hardware configuration of the electronic control unit of the first embodiment. [Figure 2]This figure shows the software configuration of the electronic control unit of the first embodiment. [Figure 3] This diagram shows the middleware configuration of the first embodiment. [Figure 4] This figure shows the time slot allocation information for the first embodiment. [Figure 5] This diagram shows the update of information stored in the time slot allocation information storage unit of the first embodiment. [Figure 6] This figure shows the data flow request information for the first embodiment. [Figure 7] This diagram shows the update of information stored in the data flow request information storage unit of the first embodiment. [Figure 8] This diagram shows an overview of the functions of the communication API provision unit in the first embodiment. [Figure 9] This figure shows the time slot request information for the first embodiment. [Figure 10] This is a flowchart showing the time slot search method by the time slot allocation unit of the first embodiment. [Figure 11] This figure shows the time slot request information for the new task (fourth task) in the second embodiment. [Figure 12] This figure shows the updates of time slot allocation information and data flow request information in the second embodiment. [Figure 13] This figure shows the hardware configuration of the vehicle control system in the third embodiment. [Figure 14] This figure shows the software configurations of the first and second electronic control devices in the third embodiment. [Figure 15] This figure shows the middleware configuration of the first and second electronic control units in the third embodiment. [Figure 16] This figure shows the time slot allocation information (before adding a new task) for the third embodiment. [Figure 17] This figure shows the data flow request information (before adding a new task) in the third embodiment. [Figure 18A]It is a diagram showing data flow requirement information regarding a new task (the fourth task) of the third embodiment. [Figure 18B] It is a diagram showing time slot requirement information regarding a new task (the fourth task) of the third embodiment. [Figure 19] It is a flowchart of the time slot search process by the time slot allocation unit of the third embodiment. [Figure 20] It is a diagram showing time slot allocation information (after adding a new task) of the third embodiment. [Figure 21] It is a diagram showing the update of time slot allocation information and data flow requirement information of the fifth embodiment. [Figure 22] It is a diagram showing the update of time slot allocation information and data flow requirement information of the sixth embodiment. [Figure 23] It is a diagram showing the hardware configuration of the vehicle control system of the eighth embodiment. [Figure 24] It is a diagram showing the software configuration of the vehicle control system of the eighth embodiment. [Figure 25] It is a diagram showing the software configuration of the vehicle control system of the ninth embodiment.

Best Mode for Carrying Out the Invention

[0012] The present invention relates to an electronic control unit (ECU) and a vehicle control system.

[0013] Hereinafter, embodiments suitable for the present invention will be described. In the embodiments of the present invention, for the sake of simplicity, an example in which the electronic control unit has one CPU and is equipped with a real-time operating system (OS) will be described. However, by multiplexing time slot allocation information based on the number of mounted cores and the number of threads, it can be easily applied to an ECU equipped with a multi-core CPU or POSIX, which is a non-real-time OS.

Embodiment

[0014] <Configuration> Figure 1 shows the hardware configuration of the electronic control unit 0 of the first embodiment, and Figure 2 shows the software configuration of the electronic control unit 0 of this embodiment.

[0015] <Electronic control unit 0> Referring to Figure 1, the hardware configuration of the electronic control unit 0 according to this embodiment will be described. The electronic control unit 0 includes a CPU 1, a memory 2, and a timer 3. The memory 2 stores information such as task codes and parameters. The data stored in the memory 2 is transferred to the CPU 1 for arithmetic processing, and the results of the arithmetic processing are stored in the memory 2. The timer 3 is used to obtain the time internally within the electronic control unit 0. In this embodiment, the timer 3 has the function of notifying the CPU 1 of the time every 10 milliseconds.

[0016] Referring to Figure 2, the software configuration of the electronic control unit 0 according to this embodiment will be described. The software is stored in the memory 2 of the electronic control unit 0 and executed by the CPU 1. The electronic control unit 0 is equipped with an Operating System (OS) 100, middleware 101, and three applications: a first task 102, a second task 103, and a third task 104. The OS 100 can be any general real-time OS or POSIX OS. The middleware 101 is started by the OS 100 and starts the applications, the first task 102, the second task 103, and the third task 104. In other words, the applications are not started directly by the OS 100, but are started by the middleware 101. Furthermore, data communication between applications is performed via the middleware 101. That is, applications are prohibited from placing shared memory themselves, and all data communication between applications is performed using the API (Application Programming Interface) provided by the middleware 101.

[0017] <Middleware 101> Figure 3 shows the configuration of middleware 101 in this embodiment.

[0018] In this embodiment, middleware 101 includes a communication API provision unit 1011, a time slot allocation unit 1012, a task startup unit 1013, a time slot allocation information storage unit 1015, and a data flow request information storage unit 1016. The functions and operations of each unit will be described later.

[0019] <Time slot allocation information 4, task activation unit 1013> Figure 4 shows the time slot allocation information 4 in this embodiment.

[0020] Time slot allocation information 4 describes the assignment of tasks to time slots. Figure 4 shows time slot allocation information 4 in tabular format, but time slot allocation information 4 may be shown in other formats. Referring to Figure 4, task startup by the task startup unit 1013 using time slot allocation information 4 will be explained. Timer 3 notifies the task startup unit 1013 of the time via OS 100. When the task startup unit 1013 receives the first time notification from Timer 3, it searches for time slot number 1 in time slot allocation information 4 and starts the assigned first task 102. After 10 milliseconds, when the task startup unit 1013 receives the second time notification from Timer 3, it searches for time slot number 2 in time slot allocation information 4 and starts the assigned second task 103. After another 10 milliseconds, when the task startup unit 1013 receives the third time notification from Timer 3, it searches for the third time slot in time slot information 4. In this case, the second task 103 is assigned, but task 2 has already been started in time slot 2 and is also assigned to time slot 3, so the task starter 1013 continues processing the second task 103. If the processing of the second task 103 is completed in time slot 2, the task starter 1013 will not start any tasks in time slot 3 (i.e., it will not start the second task 103 anew). After another 10 milliseconds, when the task starter 1013 receives notification of the fourth time from timer 3, it searches for time slot 4 in time slot assignment information 4. In this case, no tasks are assigned, so the task starter 1013 will not start any tasks. In this way, the task starter 1013 selects which task to start in each time slot. In Figure 4, eight time slots are shown, indicating that task startup is repeated with a period of 8. In other words, when middleware 101 receives the 9th time notification from timer 3, task activation unit 1013 searches for time slot number 1, just as it did for the first time notification. Hereafter, this period of time slot allocation information 4 will be referred to as a hyperperiod.Note that while Figure 4 uses 8 as an example for the hyperperiod, any non-negative integer will suffice.

[0021] <Time slot allocation information storage unit 1015> Figure 5 shows the update of the time slot allocation information 4 stored in the time slot allocation information storage unit 1015 of this embodiment.

[0022] When the time slot allocation information storage unit 1012 instructs the time slot allocation unit 1015 to update the time slot allocation information 4, the time slot allocation information storage unit 1015 adds the new task to the time slot allocation information 4 according to the input new task number (ID: Identifier) ​​and information on the allocation position and period (data flow request information 5, time slot request information 6), and updates the time slot allocation information 4 stored in the time slot allocation information storage unit 1015.

[0023] <Data flow request information 5> Figure 6 shows the data flow request information 5 of this embodiment.

[0024] Data flow request information 5 is information transmitted from outside the electronic control unit 0 to the middleware 101. As shown in Figure 5, the data flow request information 5 specifies that the fourth task 105 added to the electronic control unit 0 will use the processing results of the first task 102 and the third task 104. In this embodiment, since all tasks are periodically executed, it is necessary to consider at what point the processing results generated by the first task 102 and the third task 104 will be used by the fourth task 105. For this reason, data flow request information 5 includes time difference information. Time difference is information that indicates how many cycles ago the data generated by each input data generation task (first task 102 and third task 104) was used as input data for the new task (fourth task 105), calculated from the time slot in which the new task (fourth task 105) is started.

[0025] <Data flow request information storage unit 1016> Figure 7 shows the update of data flow request information 5 stored in the data flow request information storage unit 1016.

[0026] When the time slot allocation unit 1012 instructs the data flow request information storage unit 1016 to save a new task, it updates the data flow request information storage unit 1016 by adding new data flow request information 5 for the fourth task 105, which is the newly entered task.

[0027] <Communication API provision section 1011> Figure 8 shows an overview of the functions of the communication API provider unit 1011.

[0028] The communication API provider 1011 manages data shared between tasks and provides data according to calls from tasks. At this time, the communication API provider 1011 refers to the data flow request information 5 and provides data generated at the appropriate time. The first task 102 calls Write_data, an API provided by the communication API provider 1011, to provide processing results to other tasks (the second task 103 and the third task 104). The data flow request information 5 stored in the data flow request information storage unit 1016 shows that the communication data generated by the first task 102 is used by the second task 103 with a delay of 0 cycles and by the third task 104 with a delay of 1 cycle. Therefore, the communication API provider 1011 provides a first task generation data storage unit to store the data most recently generated by the first task 102 and the data generated one cycle prior. For example, in Figure 8, the latest value is stored in buffer 0 and the value from one cycle prior is stored in buffer 1. In other words, when the first task 102 calls Write_data, the communication API provider 1011 copies the data stored in buffer 0 of the first task generation data storage unit to buffer 1, and then writes the data to buffer 0. The second task 103 calls Read_data to use the data generated by the first task 102. At this time, the communication API provider 1011 knows by referring to the data flow request information 5 that the second task 103 will use the data generated by the first task 102 with a time difference of 0 cycles, so it copies the data stored in buffer 0 of the first task generation data storage unit and passes it to the second task 103. Similarly, the third task 104 calls Read_data to use the data generated by the first task 102. At this time, the communication API provider 1011 knows by referring to the data flow request information 5 that the second task 103 will use the data generated by the first task 102 with a time difference of 1 cycle, so it copies the data stored in buffer 1 of the first task generation data storage unit and passes it to the third task 104. As can be seen from this, the number of buffers provided in the data storage unit for each task is determined by the maximum value of the time difference included in the data flow request information 5.By executing all data communication between tasks via the communication API provider unit 1011, each task can acquire and publish data in a manner that satisfies the data flow request information 5.

[0029] <Time slot request information 6> Figure 9 shows the time slot request information 6 in this embodiment.

[0030] The time slot request information 6 is information transmitted from outside the electronic control unit 0 to the middleware 101. The time slot request information 6 indicates the period of the task and how many time slots are requested from the middleware 101 for one processing run of the task. In the time slot request information 6 shown in Figure 5, the fourth task 105 is executed with a period of 8 time slots (i.e., 80 milliseconds) and requests 2 time slots. This means that 20 milliseconds of processing time from CPU 1 is requested for one processing run of the fourth task 105. Note that if the entire task period is a hyperperiod, the period information may be omitted in the time slot request information 6.

[0031] <Time slot allocation unit 1012> Figure 10 is a flowchart showing the time slot search method by the time slot allocation unit 1012 in this embodiment.

[0032] In this embodiment, a fourth task 105 is newly added to the electronic control unit 0, which is equipped with the first task 102, the second task 103, and the third task 104.

[0033] In step S1, a number (ID) is assigned to the newly added task. In step S2, time slot allocation information 4 is obtained. That is, according to the time slot allocation information 4 shown in Figure 4, {1, 2, 2, -1, 1, 3, -1, -1} are assigned in order to the array ts_info (the number of elements is 8, as it matches the hyperperiod) for storing the time slot allocation information 4. Note that -1 indicates an empty time slot that is not allocated to any task. Next, in step S3, data flow request information 5 is stored in the array data_drow. According to the data flow request information 5 shown in Figure 6, {1, -1, 0} are assigned in order to data_flow. The first element indicates that the time difference of the first task 102 is 1 period, and the third element indicates that the time difference of the third task 104 is 0 periods. Also, by assigning -1 to the second element, it is indicated that the second task 103 is not an input data generation task. In step S4, the number of requested slots and the period included in the time slot request information 6 are stored in the variables ts_num and period, respectively. In step S5, variables for saving the search results are initialized. The variable place indicates the time slot number for initiating the new task (fourth task 105), and the variable latency is used to store the time from when the input data for the new task (fourth task 105) is generated until the new task (fourth task 105) is processed, i.e., the latency caused by the new task (fourth task 105).

[0034] In step S6, the time slot numbers from 1 to 8 are sequentially assigned to the repeating variable i, and the processes in steps S7 to S10 are repeatedly executed. The process in step S6 can be implemented using a For statement. In step S7, the array ts_info is referenced to determine if there are ts_num slots of free time slots consecutively starting from the i-th time slot. Similarly, the same determination is made for the i+period-th time slot, i+2*period-th, i+3*period-th, ..., i+(n-1)*period-th time slots. Here, n is the number obtained by dividing the hyperperiod by the period. If the determination shows that free time slots exist, the process proceeds to step S8. On the other hand, if no free time slots exist, a new task (the fourth task 105) cannot be added to the i-th time slot, so the process returns to step S6, the variable i is incremented, and the process proceeds to step S7 again. In step S8, when a new task (the fourth task 105) is added to the i-th time slot, the latency of the new task (the fourth task 105) is calculated and stored in the temporary variable tmp. The latency is calculated by referring to the array data_flow, which stores the data flow request information 5, and is the time from the end of the time slot allocated to the new task (the fourth task 105) until the end of the time slot allocated to the task that generates the input data for the new task (the fourth task 105). If there are multiple input data generation tasks, the latency should be calculated using the end time of the input data generation task furthest from the i-th time slot. For example, in the time slot allocation information 4 shown in Figure 4, if time slot i=7, the time when the first task 102, which is the input data generation task, finishes is data_flow[0]=1. Therefore, instead of time slot 5, where the first task 102 is executed, time slot 1 is referenced. The latency is calculated to be 7, as it ranges from the end of the first task 102 to time slot 8, which is when the new task (fourth task 105) finishes.For the third task 104, since data_flow[2]=0, the latency is calculated as 2, starting from time slot 6 where the third task 104 is executed, and ending at time slot 8 where the new task (fourth task 105) finishes. Therefore, the maximum latency is 7, so tmp=7. In step S9, check if the value of tmp is less than the value of latency. If the value of tmp is less than the value of latency, proceed to step S10 and update place and latency with the values ​​of i and tmp. If the value of tmp is not less than the value of latency, there is a time slot position where the latency can be shorter than time slot i, so return to step S6, increment the variable i, and proceed to step S7 again.

[0035] When the iterative processing of steps S6 to S10 is completed, in step S11, the system is instructed to save the data flow request information 5 of the new task (fourth task 105) to the data flow request information storage unit 1016. Then, in step S12, the system passes the task number (ID) TASK_NUM, the additional time slot position place, and the period information included in the time slot request information 6, which were determined in steps S1 to S10, to the time slot allocation information storage unit 1015, instructing it to update the time slot allocation information 4.

[0036] According to this embodiment, even if a new task is added to the electronic control unit 0, it does not affect the time slots already allocated for the execution of existing tasks. Therefore, even after adding a new task, the data flow between tasks is maintained, and the real-time nature of the tasks is preserved. Consequently, it is guaranteed that there will be no impact on data communication between tasks or communication with the outside of the electronic control unit, eliminating the need for timing design and verification, which had been a bottleneck, and enabling continuous improvement of the vehicle control software. Furthermore, by applying Logical Execution Time, a scheduling method that limits data exchange between tasks to predetermined timings, using the communication API provision unit 1011 and the task startup unit 1013, it is possible to absorb fluctuations in the processing time of each task and achieve the data flow defined in the data flow request information 5. Moreover, new tasks can be added in a way that minimizes latency while guaranteeing that they do not affect existing tasks. [Examples]

[0037] A second embodiment of the present invention, an electronic control device, will now be described. The difference between the second embodiment and the first embodiment is that the second embodiment increases the number of consecutive available time slots by changing the time slot allocation of existing tasks. In the second embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components that are the same as in the first embodiment, and their descriptions will be omitted.

[0038] <Time slot request information> Figure 11 shows the time slot request information 6 for the new task (fourth task 105) in this embodiment.

[0039] The time slot request information 6 is information transmitted from outside the electronic control unit 0 to the middleware 101, similar to the first embodiment. In the time slot request information 6 shown in Figure 11, the fourth task 105 is executed with a period of 8 time slots (i.e., 80 milliseconds) and requests three time slots.

[0040] <Time slot allocation unit 1012, time slot allocation information storage unit 1015, data flow request information storage unit 1016> Figure 12 shows the updates of the time slot allocation information 4 and data flow request information 5 in this embodiment.

[0041] The time slot allocation unit 1012 searches for available time slots according to the algorithm shown in Figure 10. In this embodiment, since the number of requested time slots is 3, no available time slots are found, and the search fails. Therefore, the time slot allocation unit 1012 analyzes the data flow request information 5 and searches for processes that can be moved forward. As a result, it is found that the third task 104 can be moved forward. Before the addition of the new task (the fourth task 105), the third task 104 is executed in time slot 6, and according to the data flow request information 5, it is found that the processing results executed in time slot 1 and the processing results executed in time slots 2 and 3 are used. Therefore, since the third task 104 can be executed in time slots from 4 onwards, the execution timing of the third task 104 is moved from time slot 6 to time slot 4. At this point, in order to avoid changing the data flow, the third task 104 continues to use the execution result of the first task 102 in time slot 1, so the time difference between the third task 104 and the first task 102 in the data flow request information 5 is updated from 1 cycle to 0 cycles. The time slot allocation unit 1012 then allocates the execution of the new task (fourth task 105) to time slots 6, 7, and 8, updates the time slot allocation information 4 and the data flow request information 5, and instructs the time slot allocation information storage unit 1015 and the data flow request information storage unit 1016 to update and save the data.

[0042] According to this embodiment, when a new task is to be added in a situation where sufficient free time cannot be secured by a task already being executed by the electronic control unit 0, the free time can be increased while maintaining the data flow of the existing task, and the new task can be added. [Examples]

[0043] A third embodiment of the present invention, consisting of an electronic control device and a vehicle control system, will now be described. The difference between the third embodiment and the first embodiment is that the search for available time slots is performed among multiple electronic control devices. In the third embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components identical to those in the first embodiment, and their descriptions will be omitted.

[0044] Figure 13 shows the hardware configuration of the vehicle control system 12 in this embodiment.

[0045] <Vehicle control system 12> The vehicle control system 12 has two electronic control units, a first electronic control unit 8 and a second electronic control unit 9, which are connected to each other and communicate via a communication bus 11. In this embodiment, two electronic control units are provided, but three or more electronic control units may be provided. The communication bus 11 transfers data according to known communication protocols such as CAN (Controller Area Network) and Ethernet. The first electronic control unit 8 and the second electronic control unit 9 have a communication peripheral 10, which is hardware for communicating via the communication bus 11. The communication peripheral 10 is hardware that controls communication, and specifically, it is known hardware called a CAN transceiver when the communication bus 11 is CAN, or an Ethernet PHY when it is Ethernet.

[0046] Figure 14 shows the software configurations of the first electronic control unit 8 and the second electronic control unit 9 in this embodiment.

[0047] <Software configuration of the first electronic control unit 8> The first electronic control unit 8 includes a first task 102, a second task 103, a third task 104, middleware 101, OS 100, a communication peripheral driver 110, and a first communication task 108. The communication peripheral driver 110 is software for driving the communication peripheral 10, and is called by OS 100 or middleware 101. It provides the function of accessing the communication peripheral 10, writing data to be transmitted to predetermined registers of the communication peripheral 10, and reading data received from predetermined registers of the communication peripheral 10. The first communication task 108 is a task for performing data communication in the first electronic control unit 8, and its details will be described later.

[0048] <Software configuration of the second electronic control unit 9> The second electronic control unit 9 includes a fifth task 106, a sixth task 107, middleware 101, an OS 100, a communication peripheral driver 110, and a second communication task 109. The second communication task 109 is a task for performing data communication in the second electronic control unit 9, and its details will be described later.

[0049] Figure 15 shows the configuration of the middleware 101 of the first electronic control unit 8 and the second electronic control unit 9 in this embodiment.

[0050] <Middleware 101> Middleware 101 includes a communication API provider 1011, a time slot allocation unit 1012, a task activation unit 1013, a time slot allocation information storage unit 1015, a data flow request information storage unit 1016, and an inter-middleware time synchronization unit 1014. The inter-middleware time synchronization unit 1014 is included in the vehicle control system 12 and has the function of synchronizing the time between middleware 101 mounted on electronic control devices that are connected to each other by a communication bus 11. Known methods such as NTP (Network Time Protocol) can be used for time synchronization.

[0051] Figure 16 shows the time slot allocation information 4 (before adding a new task) stored in the time slot allocation information storage unit 1015, which constitutes the middleware 101 of the first electronic control unit 8 and the second electronic control unit 9 of this embodiment.

[0052] <Time slot allocation information 4> As shown in Figure 16, the middleware 101 of both the first electronic control unit 8 and the second electronic control unit 9 stores time slot allocation information 4 for tasks installed in each electronic control unit. That is, the time slot allocation information storage unit 1015 of the first electronic control unit 8 stores time slot allocation information 4 not only for the first task 102, the second task 103, the third task 104, and the first communication task 108, but also for the fifth task 106, the sixth task 107, and the second communication task 109 executed by the second electronic control unit 9. Similarly, the second electronic control unit 9 also stores time slot allocation information 4 for tasks executed by the first electronic control unit 8 and tasks executed by the second electronic control unit 9. The time slot allocation information 4 includes information for identifying the electronic control unit to which each task is assigned.

[0053] Figure 17 shows the data flow request information 5 (before adding a new task) stored in the data flow request information storage unit 1016, which constitutes the middleware 101 of the first electronic control unit 8 and the second electronic control unit 9 of this embodiment.

[0054] <Data flow request information 5> As shown in Figure 17, the middleware 101 of both the first electronic control unit 8 and the second electronic control unit 9 stores data flow request information 5 for tasks installed in each electronic control unit. That is, the data flow request information storage unit 1016 of the first electronic control unit 8 stores data flow request information 5 not only for the first task 102, the second task 103, the third task 104, and the first communication task 108, but also for the fifth task 106, the sixth task 107, and the second communication task 109, which are executed by the second electronic control unit 9. Similarly, the second electronic control unit 9 stores data flow request information 5 for tasks executed by the first electronic control unit 8 and tasks executed by the second electronic control unit 9.

[0055] <First communication task 108 and second communication task 109 (before the addition of new tasks)> The first communication task 108 and the second communication task 109 are tasks that communicate with the outside world in the first electronic control unit 8 and the second electronic control unit 9. In this embodiment, before adding new tasks, according to the assignment of each task to the electronic control unit shown in Figure 16 and the data communication between each task shown in Figure 17, there is no data communication between the first electronic control unit 8 and the second electronic control unit 9. Therefore, the execution of the first communication task 108 and the second communication task 109 is unnecessary and they are not assigned to any time slot.

[0056] Figure 18A shows data flow request information 5 for the fourth task 105, which is a new task in this embodiment, and Figure 18B shows time slot request information 6 for the fourth task 105, which is a new task in this embodiment.

[0057] <New Task (Fourth Task 105)> In this embodiment, the newly added fourth task 105 uses the data generated by the first task 102 and the second task 103 to request two time slots.

[0058] Figure 19 is a flowchart of the time slot search process by the time slot allocation unit 1012 in this embodiment. Figure 20 is a diagram showing the time slot allocation information 4 (after adding a new task) stored in the time slot allocation information storage unit 1015, which is part of the middleware 101 of the first electronic control unit 8 and the second electronic control unit 9 in this embodiment.

[0059] <Time slot allocation unit 1012> The time slot allocation unit 1012 mounted on the first electronic control unit 8 searches for available time slots according to the algorithm shown in Figure 19.

[0060] In step S13, the time slot allocation information 4 stored in the time slot allocation information storage unit 1015 and the data flow request information 5 stored in the data flow request information storage unit 1016 are obtained. In step S14, the data flow request information 5 and time slot request information 6 related to the new task (fourth task 105) are obtained. In this embodiment, it is necessary to select an electronic control unit to which the new task (fourth task 105) will be assigned. Therefore, in step S15, the data flow request information 5 of the new task (fourth task 105) is analyzed, and available slots are searched for in order from the electronic control unit to which the most tasks that generate input data are assigned. For example, in this embodiment, the input data generation tasks for the fourth task 105 are the first task 102 and the second task 103, and as shown in Figure 16, these tasks are assigned to the first electronic control unit 8. Therefore, after searching from the first electronic control unit 8, the second electronic control unit 9 is searched, and the search in step S15 allows for the search of an electronic control unit with a small amount of communication between electronic control units.

[0061] In step S16, the same algorithm as in steps S5 to S10 in Figure 10 is applied to search for an empty slot. If an empty slot is found, a new task (the fourth task 105) can be added, as in the first embodiment, and the algorithm terminates. Note that if all input data generation tasks are assigned to the same electronic control unit, the search ends in step S16. Therefore, if input data generation tasks are assigned to multiple electronic control units, the search in step S16 may be skipped, and the search may start from step S17. In this embodiment, all input data generation tasks are assigned to the same electronic control unit, so the search in step S16 is not skipped. However, as shown in Figure 16, there are no two consecutive empty time slots in the first electronic control unit 8. Therefore, in step S15, the search target is changed to the second electronic control unit 9, and the process proceeds to step S17.

[0062] In step S17, a search is performed for consecutive empty slots in the second electronic control unit 9. Referring to Figure 16, time slots 3-4 and time slots 6-8 are consecutive empty slots. In step S18, it is determined whether a communication task can be assigned to the electronic control unit to which the input data generation task has been assigned. That is, it is determined whether the first communication task 108 for sending data from the first electronic control unit 8 to the second electronic control unit 9 can be assigned to the first electronic control unit 8. According to the data flow request information 5, the data generated by the first task 102 and the second task 103 needs to be sent to the second electronic control unit 9. If a new task (fourth task 105) is assigned to time slots 3-4 of the second electronic control unit 9, it will not be in time to send the data from the first electronic control unit 8. Therefore, empty slots 3-4 cannot be used. Time slots 6-8 can be used to assign the first communication task 108 to time slot 4 of the first electronic control unit 8.

[0063] Therefore, in step S18, time slots 6 to 8 of the second electronic control unit 9 are selected. In step S19, it is checked whether a communication task for receiving data (second communication task 109) can be assigned to the second electronic control unit 9, which is searching for an available slot to assign a new task (fourth task 105). In step S18, the first communication task 108 is assigned to time slot 4 of the first electronic control unit 8, and communication data is transmitted from the first electronic control unit 8 in time slot 4, so an available time slot after time slot 4 is suitable for the second communication task 109. Therefore, the second communication task 109 is assigned to time slot 6, which is the earliest available time slot after time slot 4 in the second electronic control unit 9, and the new task (fourth task 105) is assigned to the remaining time slots 7 to 8.

[0064] Based on the above, the time slot allocation information 4 (after adding a new task) is updated as shown in Figure 20.

[0065] According to this embodiment, a system-level Logical Execution Time scheduling method can be applied, which synchronizes the time between electronic control units and limits the start and end of communication between tasks of the electronic control units to predetermined timings by arranging communication tasks. This allows for the absorption of fluctuations in communication time between each electronic control unit, the achievement of the data flow defined in the data flow request information 5, and, in particular, the automatic determination of which electronic control unit to assign a new task and the allocation of the new task to an appropriate time slot. [Examples]

[0066] A fourth embodiment of the present invention, consisting of an electronic control device and a vehicle control system, will now be described. The difference between the fourth embodiment and the first embodiment is that, if no available time slots are found, the data flow request information 5 and time slot request information 6 for the new task are rejected. In the fourth embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components identical to those in the first embodiment, and their descriptions will be omitted.

[0067] <Time slot allocation unit 1012, time slot allocation information storage unit 1015, data flow request information storage unit 1016> If the time slot allocation unit 1012 fails to find an available time slot using the algorithm according to Embodiment 1, it rejects the request to add the new task, does not change the time slot, does not update the time slot allocation information 4 stored in the time slot allocation information storage unit 1015 and the data flow request information 5 stored in the data flow request information storage unit 1016, and does not add the new task (fourth task 105).

[0068] According to this embodiment, it is possible to prevent the disruption of data flows related to existing tasks due to the addition of new tasks. [Examples]

[0069] A fifth embodiment of the present invention, consisting of an electronic control device and a vehicle control system, will now be described. The difference between the fifth embodiment and the first embodiment is that the use case is not the addition of a new task, but rather the expansion or contraction of processing time due to changes in the processing of an existing task. In the fifth embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components identical to those in the first embodiment, and their descriptions will be omitted.

[0070] <Time slot allocation unit 1012, time slot allocation information storage unit 1015, data flow request information storage unit 1016> Figure 21 shows the updates of the time slot allocation information 4 and data flow request information 5 in this embodiment.

[0071] In the algorithm of Embodiment 1 (Figure 10), if the data flow request information 5 and time slot request information 6 relate to an existing task (e.g., the third task 104), the time slot allocation unit 1012 refers to the time slot allocation information 4 and updates the allocation information for that existing task. Note that if the data flow request information 5 is the same as the information stored in the data flow request information storage unit 1016, inputting the data flow request information 5 to the time slot allocation unit 1012 may be omitted.

[0072] According to this embodiment, even if an Over-The-Air update increases or decreases the processing time of an existing task, the allocation of that existing task to a time slot can be updated without affecting other existing tasks, and tasks that involve expansion or contraction can be updated. [Examples]

[0073] A sixth embodiment of the present invention, consisting of an electronic control device and a vehicle control system, will now be described. The difference between the sixth embodiment and the first embodiment is that the use case is the deletion of an existing task by changing the number of requested slots to 0, rather than the addition of a new task. In the sixth embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components identical to those in the first embodiment, and their descriptions will be omitted.

[0074] <Time slot allocation unit 1012, time slot allocation information storage unit 1015, data flow request information storage unit 1016> Figure 22 shows the updates of the time slot allocation information 4 and data flow request information 5 in this embodiment.

[0075] The time slot allocation unit 1012 deletes tasks with a requested number of slots of 0 if those tasks are included in the time slot request information 6. When deleting an existing task, the data flow request information 5 does not need to be input to the time slot allocation unit 1012. The time slot allocation unit 1012 deletes information about the task to be deleted from the time slot allocation information storage unit 1015 and the data flow request information storage unit 1016.

[0076] According to this embodiment, existing tasks can be deleted using the same process as adding or modifying tasks. [Examples]

[0077] The seventh embodiment of the present invention, an electronic control device and a vehicle control system, will now be described. The difference between the seventh embodiment and the sixth embodiment is that the deletion request for some tasks is rejected. In the seventh embodiment, the differences from the first to sixth embodiments will be mainly described, and the same reference numerals will be used for components that are the same as those in the first to sixth embodiments, and their descriptions will be omitted.

[0078] <Time slot allocation unit 1012, time slot allocation information storage unit 1015, data flow request information storage unit 1016> The time slot allocation unit 1012 attempts to delete a task if the number of request slots included in the time slot request information 6 is 0. When deleting a task, the data flow request information 5 stored in the data flow request information storage unit 1016 is analyzed, and if the task to be deleted is not an input data generation task for another task, that is, if the task to be deleted is not recorded in the "Input Data" column of the data flow request information 5, the deletion request is accepted, and the task is deleted in the same manner as in Example 6. On the other hand, if the task to be deleted is an input data generation task for another task, the request is rejected and the stored information is not updated, in the same manner as in Example 4.

[0079] According to this embodiment, it is possible to prevent the destruction of data flows related to other tasks by deleting existing tasks. [Examples]

[0080] The eighth embodiment of the present invention, an electronic control device and a vehicle control system, will now be described. The difference between the eighth embodiment and the first embodiment is that a server is provided to perform time slot allocation processing, and time slot allocation information 4 is provided to multiple electronic control devices. In the eighth embodiment, the differences from the first embodiment will be mainly described, and the same reference numerals will be used for components that are the same as in the first embodiment, and their descriptions will be omitted.

[0081] <Hardware configuration of the vehicle control system 12> Figure 23 shows the hardware configuration of the vehicle control system 12 in this embodiment.

[0082] The vehicle control system 12 includes an electronic control unit 0 and a server 13. The electronic control unit 0 includes a CPU 1, memory 2, timer 3, and an OTA communication peripheral 7 for performing OTA communication 15 with the server 13. The server 13 includes a software distribution device 14 for performing OTA communication 15 with the electronic control unit 0. The OTA communication 15, the OTA communication peripheral 7, and the software distribution device 14 only need to comply with known Over-The-Air technology that enables wireless software updates.

[0083] <Software configuration of vehicle control system 12> Figure 24 shows the software configuration of the vehicle control system 12 in this embodiment.

[0084] The electronic control unit 0 includes the OS 100, middleware 101, a first task 102, a second task 103, and a third task 104. The middleware 101 includes a communication API provider 1011, a task startup unit 1013, a time slot allocation information storage unit 1015, and a time slot allocation information reception unit 1017. The server 13 includes a time slot allocation unit 1012, a time slot allocation information storage unit 1015, a data flow request information storage unit 1016, and a time slot allocation information transmission unit 1018. The time slot allocation information 4 stored in the time slot allocation information storage unit 1015 included in the middleware 101 of the electronic control unit 0 includes time slot allocation information for tasks executed by the electronic control unit 0 itself. The time slot allocation information 4 stored in the time slot allocation information storage unit 1015 included in the server 13 includes time slot allocation information for tasks performed by some or all of the electronic control devices that communicate with the server 13 and are subject to OTA distribution. The time slot allocation information receiving unit 1017 has the function of receiving the time slot allocation information 4 from the server 13 using the OTA communication peripheral 7. The time slot allocation information transmitting unit 1018 has the function of transmitting the time slot allocation information 4 to the electronic control device 0 using the software distribution device 14.

[0085] According to this embodiment, by performing the time slot allocation process on the server 13, time slot allocation information 4 can be provided to multiple electronic control units 0, thereby reducing the processing load on the middleware 101 included in the electronic control units. [Examples]

[0086] The ninth embodiment of the present invention, an electronic control device and a vehicle control system, will now be described. The difference between the ninth embodiment and the eighth embodiment is that the server is provided with a function to provide information to avoid rejection when the addition of a new task, the deletion of an existing task, or the change in the number of requested time slots for an existing task is rejected. In the ninth embodiment, the differences from the first to eighth embodiments will be mainly described, and the same reference numerals will be used for components that are the same as those in the first to eighth embodiments, and their descriptions will be omitted.

[0087] <Software configuration of vehicle control system 12> Figure 25 shows the software configuration of the vehicle control system 12 in this embodiment.

[0088] Server 13 includes a time slot allocation unit 1012, a time slot allocation information storage unit 1015, a data flow request information storage unit 1016, a time slot allocation information transmission unit 1018, and an improvement information display unit 1019.

[0089] <Improvement information display section 1019> The improvement information display unit 1019 provides information to avoid rejection when it determines that it will reject the addition of a new task, the deletion of an existing task, or the change in the number of requested time slots for an existing task. Specifically, when the addition of a new task or the change in the number of requested time slots for an existing task is rejected, it shows the maximum number of available time slots that can be allocated based on the data flow request information 5. When the deletion of an existing task is rejected, it shows the tasks that need to be deleted simultaneously (or earlier) from the data flow request information 5.

[0090] According to this embodiment, information regarding timing design can be provided to designers and vehicle users.

[0091] It should be noted that the present invention is not limited to the embodiments described above, but includes various modifications and equivalent configurations within the spirit of the attached claims. For example, the embodiments described above are described in detail for the purpose of clearly illustrating the present invention, and the present invention is not necessarily limited to having all the described configurations. Furthermore, some of the configurations of one embodiment may be replaced with those of another embodiment. Furthermore, configurations of other embodiments may be added to the configuration of one embodiment. Furthermore, some of the configurations of each embodiment may be added, deleted, or replaced with those of other embodiments.

[0092] Furthermore, each of the aforementioned configurations, functions, processing units, and processing means may be implemented in hardware, for example, by designing them as integrated circuits, or they may be implemented in software by having a processor interpret and execute programs that realize each function.

[0093] Information such as programs, tables, and files that implement each function can be stored in memory, hard disks, SSDs (Solid State Drives), or other storage media such as IC cards, SD cards, and DVDs.

[0094] Furthermore, the control lines and information lines shown are those deemed necessary for explanation purposes and do not necessarily represent all control lines and information lines required for implementation. In reality, it can be assumed that almost all components are interconnected. [Explanation of Symbols]

[0095] 0 Electronic control unit 1 CPU 2 memory 3 timers 4. Time slot allocation information 5. Dataflow Request Information 6. Time Slot Request Information 7 OTA Communication Peripherals 8. First electronic control unit 9. Second electronic control unit 10 Communication Peripherals 11 Communications Bus 12. Vehicle control system 13 Servers 14. Software distribution device 15 OTA Communications 100 OS 101 Middleware 102 First Task (Application) 103 Second Task (Application) 104 Third Task (Application) 105. Fourth Task (Application) 106. Fifth Task (Application) 107. The sixth task (application) 108 First Communication Task 109 Second communications task 110 Communication Peripheral Driver 1011 Communication API provision department 1012 Time slot allocation section 1013 Task Startup Unit 1014 Inter-middleware time synchronization unit 1015 Time slot allocation information storage unit 1016 Data Flow Request Information Storage Unit 1017 Time slot allocation information receiving unit 1018 Time Slot Allocation Information Transmission Unit 1019 Improvement information display section

Claims

1. An electronic control device, The system comprises a computing device that performs predetermined calculations and periodically executes tasks, and a storage device accessible by the computing device, The timing of data input and data output for the aforementioned task is predetermined. A time slot allocation information storage unit stores time slot allocation information that defines the execution timing of the task between the predetermined data input timing and data output timing, A task startup unit that starts the task according to the time slot allocation information, The system includes a time slot allocation unit that stores information about a new task in the time slot allocation information storage unit according to the execution timing of the new task, The aforementioned time slot allocation unit, The system receives input including data flow request information that includes information about the task that generates the data to be input into the new task, information about how many cycles prior to the time slot in which the new task is launched the data generated by the task will be used, and time slot request information that includes information about the number of time slots required to execute the new task. Based on the time slot allocation information, the data flow request information, and the time slot request information, an available time slot for executing the new task is searched for. An electronic control device characterized by updating the time slot allocation information so as to allocate the new task to the searched available time slot.

2. The electronic control device according to claim 1, The electronic control device is characterized in that the time slot allocation unit allocates the new task to the searched available time slot and updates the time slot allocation information so as to reduce the latency of the new task.

3. An electronic control device according to claim 1, The aforementioned time slot allocation unit, If the search for an available time slot that satisfies both the data flow request information and the time slot request information for the new task fails, the system refers to the data flow request information and the time slot allocation information, modifies the time slot allocated to the existing task to satisfy the data flow request of the existing task, and generates an available time slot. An electronic control device characterized by updating the time slot allocation information so as to allocate the execution of the new task to the generated free time slot.

4. An electronic control device according to claim 1, Synchronize time with other electronic control devices that perform the aforementioned task, An electronic control device characterized in that, when data communication with other electronic control devices is required based on the data flow request information, the time slot allocation information includes predetermined timings for data communication between the tasks.

5. An electronic control device according to claim 1, The electronic control device is characterized in that, if the time slot allocation unit fails to search for an available time slot that satisfies both the data flow request information and the time slot request information for the new task, it rejects the request to add the new task and does not update the data flow request information and the time slot allocation information.

6. An electronic control device according to claim 1, The aforementioned time slot allocation unit, If the processing time of an existing task increases or decreases, based on the time slot allocation information, the data flow request information, and the time slot request information, a free time slot is searched for to run the existing task whose processing time is changed. An electronic control device characterized by updating the time slot allocation information so as to allocate the existing task to the searched available time slot.

7. An electronic control device according to claim 1, The aforementioned time slot allocation unit, An electronic control device characterized by deleting information about an existing task related to a deletion request from the data flow request information and the time slot allocation information in accordance with a deletion request for an existing task.

8. The electronic control device according to claim 7, The aforementioned time slot allocation unit, The aforementioned data flow request information is analyzed, An electronic control device characterized in that, if an existing task related to the deletion generates input data for another task, it rejects the deletion request and does not update the data flow request information and the time slot allocation information.

9. A vehicle control system, An electronic control device according to any one of claims 1 to 8, The electronic control unit is equipped with a server capable of communicating with it, The aforementioned server, Store time slot allocation information and data flow request information. Based on the time slot allocation information and the data flow request information, an available time slot is searched for according to the time slot request. The time slot allocation information is updated to allocate the task related to the request to the aforementioned free time slot. The updated time slot allocation information is transmitted to the electronic control unit. The vehicle control system is characterized in that the electronic control unit updates the time slot allocation information it stores using time slot allocation information received from the server.

10. A vehicle control system according to claim 9, The server has an improvement information display unit that, as a result of searching for the time slots, displays information regarding the rejection of a request to change the number of time slots for the task. A vehicle control system characterized in that the information regarding the rejection includes at least one of the maximum number of available time slots that satisfy the data flow request information, and information about an existing task that generates input data for the task.

11. A method for controlling a task performed by an electronic control unit, The electronic control unit comprises a arithmetic unit that performs predetermined calculation processing and periodically executes tasks, and a storage device accessible by the arithmetic unit. The timing of data input and data output for the aforementioned task is predetermined. The storage device stores time slot allocation information that defines the execution timing of the task between the predetermined data input timing and the data output timing. The control method for the aforementioned task is: The arithmetic unit performs a task startup procedure in which it starts the task according to the time slot allocation information, The calculation unit includes a time slot allocation procedure for saving information about a new task according to the timing of the execution of the new task, In the aforementioned time slot allocation procedure, The arithmetic unit receives input including data flow request information which includes information about the task that generates the data to be input to the new task, information which includes how many cycles prior to the time slot in which the new task is launched the data generated by the task will be used, and time slot request information which includes information on the number of time slots required to execute the new task. The computing unit searches for an available time slot to execute the new task based on the time slot allocation information, the data flow request information, and the time slot request information. A task control method characterized in that the computing device updates the time slot allocation information so as to allocate the new task to the searched free time slot.

12. A method for controlling a task according to claim 11, A task control method characterized in that, in the time slot allocation procedure, the computing unit allocates the new task to the searched available time slot in such a way that the latency of the new task is reduced, and updates the time slot allocation information.