Electronic Control Unit
The parallel arithmetic processor addresses delayed processing by reallocating tasks to available units, ensuring timely completion of dependent instructions and maintaining efficient vehicle control.
Patent Information
- Application Number
- JP2020122841
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2024-08-14
- Estimated Expiration
- 2040-07-17
AI Technical Summary
In complex microcomputer systems, dependencies between arithmetic instructions can lead to delayed processing times, particularly when one instruction takes longer than expected, causing delays in subsequent instructions and impacting vehicle control.
A parallel arithmetic processor with a scheduler function allocates arithmetic instructions to appropriate units and switches processing to another unit if a predetermined time limit is exceeded, ensuring timely completion of dependent instructions.
This approach suppresses delays in processing by reallocating tasks to available units, maintaining efficient operation and reducing the risk of delayed vehicle control systems.
Smart Images

Figure 0007532972000002 
Figure 0007532972000007 
Figure 0007532972000001
Abstract
Description
[Technical field]
[0001] The present invention relates to an electronic control device. [Background technology]
[0002] In recent years, for example, the control of automobiles has become more complicated, and there is a demand for improving the processing power of microcomputers. One of the techniques for improving the processing power of microcomputers is to equip them with parallel arithmetic processors having multiple arithmetic units. In this parallel arithmetic processor, the arithmetic units that process each arithmetic instruction that constitutes a group of arithmetic instructions are preset, and the group of arithmetic instructions is processed by allocating the arithmetic instructions to the corresponding arithmetic units using a scheduler function. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-87004 A Summary of the Invention [Problem to be solved by the invention]
[0004] Incidentally, there are cases where a group of calculation instructions has a dependency relationship in which the calculation instruction B starts processing on the condition that the processing of the calculation instruction A has been completed. In such a case, the calculation instruction B must wait until the calculation instruction A has been completed. However, if the processing of operation instruction A takes a long time, the completion time of the processing of operation instruction B may be delayed more than expected, and the time required for processing the operation instruction group may become longer. In such a case, it will take time for the microcomputer to carry out the next process based on the operation result of the operation instruction group, which is expected to cause a problem in controlling the automobile.
[0005] The present invention has been made in consideration of the above-mentioned circumstances, and its object is to provide an electronic control device that can prevent delays in the processing of calculation instructions even when the processing order of the calculation instructions that make up a group of calculation instructions is specified. [Means for solving the problem]
[0006] According to the invention of claim 1, the parallel arithmetic processor (13) is One of When the processing time of the first operation instruction assigned to the Another one is The original calculator And there is no other one in progress This makes it possible to prevent delays in processing the second operation instruction that is affected by the first operation instruction. In this case, the initial arithmetic unit is the arithmetic unit that is assigned to process the second operation instruction after the processing of the first operation instruction is completed. [Brief description of the drawings]
[0007] [Figure 1] FIG. 1 is a functional block diagram showing a configuration of a microcomputer according to an embodiment. [Diagram 2] Block diagram showing the connections between the engine ECU and each ECU [Diagram 3] A block diagram showing the schematic configuration of a parallel arithmetic processor. [Figure 4] Diagram showing graph structure [Diagram 5] Diagram showing thread processing order [Figure 6] Flowchart showing the operation of the core [Figure 7] Flowchart showing the operation of the parallel processor DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Hereinafter, an embodiment will be described with reference to the drawings. 1, a microcomputer 11 is configured to include a core group 12 consisting of multiple cores 12a to 12d, and a parallel arithmetic processor 13. These cores 12a to 12d and parallel arithmetic processor 13 perform multiple arithmetic operations in parallel to achieve high speed processing.
[0009] The cores 12a to 12d and the parallel arithmetic processor 13 are connected to each other via an internal bus 14, and are also connected to memories 15 such as ROM and RAM, and peripheral circuits 16 such as an AD converter and a CAN (Controller Area Network) interface. CAN is a registered trademark.
[0010] Cores 12a to 12d input digital values obtained by converting detection signals from various sensors for detecting the operation of actuators for controlling the engine and the operating state of the engine into digital values using an AD converter, and when calculation processing is required to process the digital values and obtain a specified physical value, they issue a processing request to parallel calculation processor 13.
[0011] As shown in Fig. 2, the vehicle is equipped with an engine ECU (Electronic Control Unit) 1. The engine ECU 1 is mainly composed of the above-mentioned microcomputer 11. The engine ECU 1 corresponds to an electronic control device. The engine ECU 1 is communicatively connected to other ECUs such as an automatic transmission ECU 3, a meter ECU 4, and an air conditioning ECU 5 via an in-vehicle LAN 2. The protocol of the in-vehicle LAN 2 is, for example, CAN.
[0012] 3, the parallel arithmetic processor 13 is composed of a memory 17, an arithmetic control unit 18, and a parallel arithmetic unit 19. A group of arithmetic instructions requested for processing by each of the cores 12a to 12d is stored in order in the memory 17. The cores 12a to 12d correspond to the control unit.
[0013] The arithmetic control unit 18 performs arithmetic processing on the group of arithmetic instructions stored in the memory 17 in cooperation with the parallel arithmetic unit 19. In other words, the arithmetic control unit 18 has a scheduler function and automatically allocates the arithmetic instructions stored in the memory 17 to the parallel arithmetic unit 19.
[0014] The parallel calculation unit 19 is of a first-in first-out (FIFO) type, and sequentially processes the calculation instructions assigned to the parallel calculation unit 19 by the calculation control unit 18. The parallel calculation unit 19 is a collection of the same or different types of arithmetic units, and can process the same or different types of calculation instructions in parallel. The parallel calculation unit 19 stores the calculation results in the memory 17.
[0015] 1, when requesting the parallel arithmetic processor 13 to process a group of arithmetic instructions, acquires the results of the arithmetic operation via the memory 17 and performs subsequent processing based on the results of the arithmetic operation. Hereinafter, the group of arithmetic instructions is referred to as a graph, and the arithmetic instructions are referred to as threads.
[0016] The graphs for which the cores 12a to 12d make processing requests define the order of thread processing. For example, the graph shown in Fig. 4 defines that threads B and C are processed after thread A is completed, thread D is processed after both threads B and C are completed, and thread E is processed after thread B is completed.
[0017] Incidentally, in the case of a graph structure as shown in Fig. 4, since there is a dependency in which the processing of thread E is started after the processing of thread B is completed in the computing unit Y as shown in Fig. 5, thread E must wait until the processing of thread B is completed, and the processing completion time of thread E may be delayed from the expected time. For this reason, the output of the graph calculation result from the parallel computing unit 13 may be delayed, which may cause a malfunction. Note that the processing timing of each thread in Fig. 5 is shown to make it easier to understand the processing order of the threads, and differs from the actual timing.
[0018] As an example of a defect, even if it is determined that there is no effect on the end time of the graph when threads B and E are processed by the same calculator Y, if the microcomputer 11 having the above configuration is adopted for an engine ECU of a different vehicle model, there is a possibility that a longer than expected delay occurs before the calculation result of the graph is output. For example, if the number of cylinders of an engine is changed from 4 to 8, the processing of thread B in the crank missing tooth determination may be prolonged, and the actual end time of the graph processing may be delayed longer than the expected end time of the graph processing.
[0019] For these reasons, in this embodiment, even when multiple dependent threads use the same arithmetic unit, a delay in graph processing is suppressed as described below.
[0020] As a basic operation, the cores 12a to 12d request the parallel calculation processor 13 to process a graph. When the parallel calculation processor 13 receives a request for graph processing from the cores 12a to 12d, it allocates threads constituting the graph to corresponding calculation units in the parallel calculation unit 19. The calculation units process the allocated threads in order. Then, the calculation control unit 18 transmits the calculation results of the graph to the cores 12a to 12d. This enables the cores 12a to 12d to execute various controls based on the calculation results of the graph processed by the parallel calculation processor 13.
[0021] Now, as shown in FIG. 6, when the cores 12a to 12d request the parallel processor 13 to perform processing, they start measuring the graph processing time T1 (S101) and determine whether the measurement has ended (S102). Here, as shown in Fig. 4, the graph structure processes thread A, then threads B and C in parallel, and after those processes are completed, thread D is processed, and after the operation of thread B is completed, thread E is processed. Also, as shown in Fig. 5, threads A and D are processed by computing unit X, threads B and E are processed by computing unit Y, and thread C is processed by computing unit Z. Threads A and D have the same operation instruction, and threads B, C, and E have the same operation instruction. Thread B corresponds to the first operation instruction, and thread E corresponds to the second operation instruction. In this case, there is a dependency relationship in which the processing of thread E starts after the processing of thread B is completed. Computing unit Y corresponds to the initial computing unit, and computing unit Z corresponds to the other computing unit.
[0022] 7, the parallel processor 13 starts measuring the thread processing time T2 after the thread processing ends (S201), and judges whether the thread processing time T2 is equal to or greater than a second predetermined value (S202). The second predetermined value is a time that is sufficient to judge that the thread processing time is longer than the expected value. Under normal circumstances, the thread processing time T2 is less than the predetermined value (S202: NO), and the process ends.
[0023] As shown in Fig. 6, when the cores 12a to 12d receive the results of the calculation by the parallel calculation processor 13, they determine that the measurement is finished (S102: YES), and determine whether the graph processing time T1 is equal to or longer than a first predetermined value (S103). The first predetermined value is a time that is sufficient to determine that the graph processing time is longer than an expected value. When the thread processing time T2 is less than the second predetermined value, the graph processing time T1 is less than the first predetermined value. Under normal circumstances, the graph processing time T1 is less than the predetermined value (S103: NO), and the process ends.
[0024] On the other hand, when the thread processing time T2 becomes equal to or greater than the second predetermined value (S202: YES), the parallel processor 13 obtains the name of the thread to be executed next in the graph (S203), and then judges whether there is a vacancy in another processor (S204). In the example shown in Fig. 5, since there is a vacancy in the processor Z (S204: YES), the thread E is moved to the other processor, the processor Z (S205). As a result, the processor that processes the thread E is switched from the original processor Y to the other processor Z, and the thread E is processed by the processor Z. By performing the above operations, the processing of thread E can be expedited.
[0025] Furthermore, if there is no free space in the other computing units (S204: NO), the parallel computing unit 13 waits in the original computing unit and processes the delayed thread preferentially when the original computing unit becomes free (S206: YES). At this time, since it is clear that the processing of the delayed thread will be delayed, the thread name of the delayed thread is notified (S207). This notifies the cores 12a to 12d of the thread delay.
[0026] When the graph processing time T1 becomes equal to or greater than a first predetermined value (S103: YES), and when a thread delay notification is received from the parallel arithmetic processor 13 (S104: YES), the cores 12a to 12d process the graph having the delayed thread (S105). This enables the graph processing to be completed faster than the parallel arithmetic processor 13 can perform the processing. Although not shown in the flowchart of FIG. 6, if the graph processing by the parallel arithmetic processor 13 is completed and an operation result is received before the graph processing is completed, the operation result is adopted.
[0027] When the graph processing time T1 becomes equal to or greater than a first predetermined value (S103: YES), if there is no thread delay notification (S104: NO), the cores 12a to 12d issue a diagnostic notification that the delay is due to a factor other than the thread (S106).
[0028] According to this embodiment, the following effects can be obtained. When the processing time of a thread allocated to a calculator becomes equal to or longer than a second predetermined value, the parallel calculation processor 13 switches the calculator originally allocated to process the next calculation instruction after the processing of the thread is completed to another calculator, thereby preventing delays in the processing of threads affected by the thread.
[0029] When the parallel arithmetic processor 13 switches from an original arithmetic unit to another arithmetic unit while the other arithmetic unit is processing, the thread waits in the original arithmetic unit and is processed when the original arithmetic unit becomes available, so that the thread can be processed reliably.
[0030] If the parallel arithmetic processor 13 is unable to switch the original arithmetic processor to another arithmetic processor, it notifies the cores 12a to 12d that a delay has occurred in the processing of the thread after processing of the thread, so that the cores 12a to 12d can recognize that the processing of the graph will be delayed.
[0031] When a thread delay notification is received from the parallel arithmetic processor 13, the cores 12a to 12d process the graph if the graph processing time T1 by the parallel arithmetic processor 13 becomes equal to or greater than a first predetermined value, thereby preventing a situation in which the graph is not processed.
[0032] When the parallel arithmetic processor 13 does not notify the cores 12a to 12d of a delay, and the graph processing time T1 by the parallel arithmetic processor 13 exceeds a first predetermined value, the cores 12a to 12d provide a diagnostic notification that a delay has occurred due to a cause other than a delay in thread processing, thereby making it possible to notify the cores that a delay has occurred due to a cause other than a thread delay.
[0033] (Other embodiments) The parallel arithmetic processor 13 may notify the cores 12a to 12d that a delay has occurred in the graph processing when the graph processing time becomes equal to or greater than a second predetermined value, regardless of whether the original arithmetic processor has been switched to another arithmetic processor. In this case, the parallel arithmetic processor 13 can reliably notify the cores 12a to 12d of the graph processing delay when the graph processing is delayed after the original arithmetic processor has been switched to another arithmetic processor.
[0034] When the processing time of the thread becomes equal to or longer than the second predetermined value, the parallel calculation processor 13 may switch the initial calculation unit to another calculation unit in advance when processing the same graph from the next time onwards. Specifically, the calculation unit that moved the thread and performed the calculation is stored, and the delayed thread is processed by the calculation unit that stored the delayed thread from the next time onwards when processing the same graph. This allows the calculation unit that processes the delayed thread from the beginning to be processed by another calculation unit in the next graph processing, so that the operation of the parallel calculation processor 13 can be simplified.
[0035] Although the present disclosure has been described based on the embodiment, it is understood that the present disclosure is not limited to the embodiment or structure. The present disclosure also encompasses various modifications and modifications within the equivalent range. In addition, various combinations and forms, as well as other combinations and forms including only one element, more than one element, or less than one element, are also within the scope and concept of the present disclosure. [Explanation of symbols]
[0036] In the drawing, reference numeral 1 denotes an engine ECU (electronic control unit), 11 denotes a microcomputer, 12a to 12d denote cores (control units), and 13 denotes a parallel arithmetic processor.
Claims
1. An electronic control device comprising a microcomputer (11) having a control unit (12a to 12d) and a parallel arithmetic processor (13) having three or more arithmetic units for processing an arithmetic instruction group requested by the control unit, the parallel arithmetic processor processing the arithmetic instructions constituting the arithmetic instruction group by allocating them to corresponding arithmetic units, when a processing time of a first operation instruction allocated to one of the arithmetic units becomes equal to or longer than a predetermined value, the parallel arithmetic processor switches the original arithmetic unit allocated with a second operation instruction affected by the first operation instruction to yet another arithmetic unit not currently processing the first operation instruction, The initial arithmetic unit is an arithmetic unit that is assigned to process the second operation instruction after the processing of the first operation instruction is completed.
2. 2. The electronic control device according to claim 1, wherein when the parallel calculation processor switches from the initial calculation unit to the yet another calculation unit, if the yet another calculation unit is processing, the first calculation instruction waits in the initial calculation unit and is processed when the yet another calculation unit becomes available.
3. 3. The electronic control device according to claim 1, wherein the parallel arithmetic processor notifies the control unit that a delay is occurring in the processing of the second arithmetic instruction when the original arithmetic unit cannot be switched because the other arithmetic unit is processing.
4. 3. The electronic control device according to claim 1, wherein the parallel arithmetic processor notifies the control unit that a delay is occurring in the processing of the group of arithmetic instructions when the processing time of the group of arithmetic instructions exceeds a predetermined value, regardless of whether the initial arithmetic unit has been switched to the further one arithmetic unit.
5. 5. The electronic control device according to claim 1, wherein when the processing time of a first operation instruction becomes equal to or exceeds a predetermined value, the parallel operation processor switches the initial operation unit to the other one of the operation units in advance when processing the same group of operation instructions from the next time onwards.
6. 6. The electronic control device according to claim 3, wherein the control unit processes a group of operation instructions when a delay is notified from the parallel arithmetic processor and a processing time of the group of operation instructions by the parallel arithmetic processor becomes equal to or longer than a predetermined value.
7. 7. The electronic control device according to claim 3, wherein when a processing time of a group of operation instructions by the parallel operation processor reaches or exceeds a predetermined value in the absence of a notification of a delay from the parallel operation processor, the control unit provides a diagnostic notification that a delay is occurring due to a cause other than a delay in the processing of the second operation instruction.
Citation Information
Patent Citations
Image processing method and image processing apparatus
JP2016001469A
Electronic control device
JP2019087004A
