DATA PROCESSING DEVICE

The data processing device with a common counter and completion flags for multiple CPUs optimizes synchronicity processing by reducing load and enhancing efficiency through asynchronous task execution during synchronous processing completion.

DE102015213370B4Active Publication Date: 2024-09-12DENSO CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
DE102015213370
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2014-07-18
Filing Date
2015-07-16
Publication Date
2024-09-12
Estimated Expiration
2035-07-16

AI Technical Summary

Technical Problem

Conventional multiprocessor systems with multiple CPUs face increased processing loads for synchronicity as the number of CPUs increases, requiring each CPU to reference all synchronicity flags, leading to inefficiencies.

Method used

A data processing device with multiple CPUs utilizes a common counter and completion flags, where each CPU sets its own exit flag upon completing processing, and the counter is updated based on a predetermined number of these flags, allowing CPUs to execute synchronous and asynchronous processing based on the counter value.

Benefits of technology

This approach reduces the overall processing load for synchronicity, improving efficiency by enabling CPUs to execute asynchronous processing during synchronous processing completion and allowing quick switching to asynchronous tasks when the counter value allows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Data processing device, including: a variety of CPUs (1a-1d); a plurality of termination flags (7a-7d) corresponding to the plurality of CPUs, each of the CPUs independently setting a corresponding termination flag corresponding to each of the CPUs, and each of the termination flags indicating the termination of execution of a processing operation requiring synchronization; a counter (13) that indicates a state after a predetermined number of termination flags have been set and before all of the termination flags have been set, based on a counter value, wherein the predetermined number of termination flags corresponds to a part of a total number of termination flags of the CPUs; a first update section (15, S207) that updates the counter value when the predetermined number of termination flags is set; and a second update section (16, 17, S210-S240) that further updates the counter value and resets all of the termination flags when the first update section updates the counter value and all of the termination flags are set, where: Each of the CPUs performs the processing requiring synchronization in accordance with the counter value updated by the second update section (S110-S160); and After each of the CPUs has finished processing that requires synchronization and set the corresponding termination flag, each of the CPUs performs processing that does not require synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a data processing device that includes multiple CPUs.

[0002] A multiprocessor system with multiple CPUs uses a synchronicity flag prepared for each CPU to implement concurrency between CPUs (see, for example, JP 2005 - 71 109 A). Conventional technology prepares a synchronicity flag for each CPU in a synchronicity flag region in memory that each CPU accesses. The synchronicity flag is a counter of one or more bits. When each CPU synchronizes with another CPU (for example, in a case where it is necessary to maintain time sequences and access an identical variable in a memory region or an identical I / O device), each CPU sets a value indicating which processing has been executed in its own synchronicity flag.When each CPU completes a processing operation and proceeds to the next processing operation, each CPU continues to refer to all synchronization flags of other CPUs and waits for a condition such that all synchronization flags assume a value that allows it to proceed to the next processing operation. When all synchronization flags assume the value, each CPU proceeds to the next processing operation.

[0003] Furthermore, from DE 11 2008 004 193 B4 a multiprocessor system is known in which a first electronic control unit sends a synchronization signal to periods and a second electronic control unit starts counting a control period using the synchronization signal as a trigger.

[0004] Furthermore, multiprocessor systems are also known from DE 11 2013 001 146 T5, DE 10 2010 038 466 A1, US 2010 / 0 115 249 A1 and US 5 371 896 A.

[0005] The inventor of the present application noted the following: In conventional technology, each CPU must reference all synchronicity flags of other CPUs for synchronization. As the number of CPUs increases, the number of reference times required for synchronization may increase at an accelerated rate. The processing load for synchronization may increase for the entire data processing device.

[0006] An object of the invention is to improve processing efficiency for synchronicity in a data processing apparatus having multiple CPUs.

[0007] This object is achieved by the data processing device having the features according to claim 1. Advantageous embodiments are the subject of the dependent claims.

[0008] According to one aspect of the invention, a data processing apparatus includes a plurality of CPUs, a plurality of completion flags, a counter, a first update section, and a second update section. The plurality of completion flags respectively correspond to the plurality of CPUs. Each of the CPUs independently sets a corresponding completion flag corresponding to each of the CPUs. Each of the completion flags indicates execution completion of processing requiring synchronization. The counter indicates a state after a predetermined number of the completion flags are set and before all of the completion flags are set, based on a counter value. The predetermined number of completion flags corresponds to a portion of a total number of completion flags of the CPUs. The first update section updates the counter value when the predetermined number of completion flags is set.The second update section continues to update the counter value and resets all of the completion flags if the first update section updates the counter value and all of the completion flags are set. Each of the CPUs executes the synchronization-requiring processing according to the counter value updated by the second update section. After each of the CPUs completes the synchronization-requiring processing and sets the corresponding completion flag, each of the CPUs executes processing that does not require synchronization.

[0009] According to the data processing device, each of the CPUs can refer to the common single counter and execute the processing to be synchronized. Therefore, it is possible to reduce the processing load for synchronization in the entire data processing device compared to conventional technology. Therefore, it is possible to improve the efficiency of synchronization processing.

[0010] Each of the CPUs executes necessarily synchronous processing according to the counter value. During a period after the completion or termination of the necessarily synchronous processing and the setting of its own termination flag, each of the CPUs executes non-necessarily synchronous processing before the start of the following necessarily synchronous processing. This makes it possible to further improve processing efficiency.

[0011] For example, assume that in each processing, there is a section that is not necessarily executed. The section that is not necessarily executed corresponds, for example, to processing that is only executed when the processing load is small. In this case, if the counter value is equal to a value to be updated by the first update section before execution or during execution of the processing, the section that is not necessarily executed can be omitted. In this case, it is possible to quickly switch to another processing and improve processing efficiency.

[0012] The above and other objects, features and advantages of the invention will become more apparent from the following detailed description with reference to the accompanying drawings. Fig. 1 is a diagram illustrating a configuration of a multi-core processor; Fig. 2 is a diagram showing a processing operation flow in each CPU; Fig. 3 is a flowchart showing processing performed by each CPU; Fig. 4 is a diagram illustrating a configuration of a multi-core processor in a second embodiment; Fig. 5A is a diagram illustrating a processing operation in each CPU in a third embodiment; Fig. 5B is a flowchart illustrating counter manipulation processing in the third embodiment; and Fig. 6 is a flowchart illustrating counter manipulation processing in a fourth embodiment.

[0013] A data processing device according to the present invention will be explained below. It is assumed that the data processing device according to the present invention is applied to a multi-core processor. The multi-core processor in the present embodiment is a microprocessor in which multiple CPUs are assembled in a single package. Since each of the multiple CPUs incorporated can be referred to as a CPU core or a core, this type of microprocessor is referred to as a multi-core processor. (First embodiment)

[0014] As in Fig. 1, a multi-core processor 11 in a first embodiment includes a plurality of CPUs 1a, 1b, 1c, 1d, a ROM 2 that stores fixed data and a program executed by each of the CPUs 1a-1d, a memory 3 shared by each of the CPUs 1a-1d, I / Os 4, 5, and a bus 6 that interconnects the above elements. The multi-core processor 11 can also be simply referred to as a processor. The inputs / outputs 4, 5 correspond to an example of an I / O device. The memory 3 is, for example, a RAM in the embodiments. The number of the plurality of CPUs is, for example, four in the embodiment.

[0015] The processor 11 includes four termination flags 7a, 7b, 7c, 7d, which are provided for the CPUs 1a-1d, respectively. The termination flags 7a-7d correspond to the CPUs 1a-1d, respectively. The processor 11 includes exclusive lines 9a, 9b, 9c, 9d. The exclusive lines 9a-9d connect the CPUs 1a-1d and the termination flags 7a-7d, respectively, for setting the termination flags 7a-7d, as shown in Fig. 1. In this example, setting exit flags 7a-7d means writing "1" to exit flags 7a-7d with a single exclusive instruction. The exclusive instruction can be, for example, a bit manipulation instruction "setf."

[0016] Incidentally, in the embodiment, in a case where the CPUs 1a-1d are not particularly distinguished from each other, any one of the CPUs 1a-1d will be referred to as a CPU 1. Similarly, in a case where the completion flags 7a-7d are not particularly distinguished from each other, any one of the completion flags 7a-7d will be referred to as a completion flag 1.

[0017] The processor 11 includes a counter 13 common to the CPUs 1a-1d. The processor 11 includes an OR circuit 15, an AND circuit 16, and an adder circuit 17 as a hardware circuit that operates the counter 13 in accordance with the completion flags 7a-7d.

[0018] In the present embodiment, counter 13 is a counter with 2 bits or more. CPUs 1a-1d are accessible to the counter via bus 6.

[0019] The OR circuit 15 sets a logical AND value of the completion flags 7a-7d into a least significant bit (LSB) of the counter 13. Therefore, when a predetermined number (1 in this example) of the completion flags 7a-7d are set, the OR circuit 15 sets the LSB of the counter 13 from "0" to "1." Incidentally, the predetermined number of completion flags 7a-7d is a portion of the completion flags 7a-7d, that is, is equal to or less than the total number of the completion flags 7a-7d. Setting the LSB of the counter 13 from "1" to "0" corresponds to updating a value of the counter 13 to a value greater by 1. That is, when the LSB of the counter 13 is set from "1" to "0," the counter 13 is incremented by 1. The value of counter 13 can also be called a counter value.

[0020] The adder circuit 17 outputs a value that adds 1 to a data value of the second bit or more of the counter 13.

[0021] When all of the completion flags 7a-7d are set, the AND circuit 16 outputs a write enable signal (WE signal) to the counter 13. Then, the output value of the adder circuit 17 is written into the second bit or more of the counter 13. When the counter 13 outputs the WE signal, all of the completion flags 7a-7d are reset (cleared to "0"), and the LSB of the counter 13 is set to "0" by the OR circuit 15. When all of the completion flags 7a-7d are set, the counter 13 is incremented by one total.

[0022] Therefore, if all of the completion flags 7a-7d are set after all of the completion flags 7a-7d have been reset, the counter 13 is incremented by a total of 2 increments. That is, if any of the completion flags 7a-7d is set after all of the completion flags 7a-7d have been reset, the counter 13 is incremented by one increment by the OR circuit 15 (that is, the LSB of the counter 13 is set to "1"). If all of the completion flags 7a-7d are set, the counter 13 is incremented by one increment by the AND circuit 16. Then, all of the completion flags 7a-7d are reset.

[0023] Incidentally, a state in which the LSB of the counter 13 is equal to "1" (that is, a state in which the counter value is an odd number) indicates a state in which one of the completion flags 7a-7d has been set and not all of the completion flags 7a-7d have been set yet.

[0024] The counter value is reset to 0 after a predetermined final value. A period of time in which the counter value returns from 0 to 0 corresponds to one cycle (see Fig. 2.).

[0025] The processing in each of the CPUs 1a-1d is explained below. <abriss>

[0026] The processor 11 is provided with, for example, an electronic control unit that controls a vehicle engine. Each of the CPUs 1a-1d executes control processing for controlling the engine. The control processing for controlling the engine is periodic control processing (also referred to as periodic control system processing) that has a periodicity.

[0027] Periodic control processing can perform synchronization at a global coarse-grain level, or perform global coarse synchronization. The control processing is divided into a section where synchronization is required and a section different from this section (a section that does not require synchronization). Incidentally, synchronization involves exclusion. A section represents a part of the entire processing. Therefore, the section requiring synchronization is processing (hereinafter referred to as processing requiring synchronization) in which synchronization is required and corresponds to processing that should be executed in an orderly manner.Similarly, the section not requiring synchronization is processing (hereinafter referred to as processing not requiring synchronization) in which synchronization is not required, and corresponds to processing that can be executed at any time. Processing that can be executed at any time means processing that has no temporal relevance with other processing.

[0028] In the present embodiment, it is assumed that synchronicity windows W1, W2 are determined by the counter value as in Fig. 2 and are provided via the CPUs 1a-1d. In each synchronicity window, the section requiring synchronicity (cf. section 1 and section 2 in Fig. 2). Furthermore, since the section not requiring synchronicity (cf. a diagonally hatched part of Fig. 2) is provided between sections 1 and 2, it is possible to realize synchronicity with less waste in a coarse grain degree or with less unnecessary effort to realize synchronicity roughly. <verarbeitungsanordnung>

[0029] Initially, processing is divided into processings (processes requiring synchronicity) that require synchronicity. The divided processing requiring synchronicity and a processing not requiring synchronicity that follows the divided processing requiring synchronicity are combined into a single processing.

[0030] As indicated by Section 1, Section 2 and the diagonally hatched parts following Section 1 and Section 2 in Fig. As shown in Figure 2, the unit processing, which includes processing requiring synchronization and processing not requiring synchronization, is arranged (scheduled) in each of the CPUs 1a-1d. Each unit processing is associated with the counter value.

[0031] In Fig. 2, a section M (M is an integer of 1 or more) is the section (processing requiring synchronization) that requires synchronization, and the obliquely hatched part following the section M is a section (the section not requiring synchronization) that does not require synchronization. The section not requiring synchronization is executable independently of the execution content of other CPUs 1.

[0032] In Fig. 2, a case where the counter value is 0 or 1 corresponds to the synchronicity window W1. Section 1 is located at the synchronicity window W1. A case where the counter value is 2 or 3 corresponds to the synchronicity window W2. Section 2 is located at the synchronicity window W2. That is, a case where the counter value is N (N is 0 or a larger even number) and (N + 1) corresponds to a synchronicity window Wm (M = N / 2 + 1). A section M is located at the synchronicity window Wm.

[0033] For example, section 1 of the CPU 1a is processing in which the CPU 1a accesses the input / output 4. Section 1 of the CPU 1b is processing in which the CPU 1b accesses the input / output 5. Section 1 of the CPU 1c is processing in which the CPU 1c accesses a variable Da in the memory 3. Section 1 of the CPU 1d is processing in which the CPU 1d accesses a variable Db in the memory 3. Section 1 of the CPU 1a is processing in which the CPU 1a accesses the input / output 5. Section 1 of the CPU 1b is processing in which the CPU 1b accesses the input / output 4. Section 1 of the CPU 1c is processing in which the CPU 1c accesses a variable Da in the memory 3. Section 1 of the CPU 1d is a processing in which the CPU 1d accesses a variable Dd in the memory 3. Consequently, it is provided orIt is planned that an identical access target is not accessed simultaneously from multiple CPUs 1. <Verarbeitungsbetriebsablauf in jeder CPU>

[0034] As in Fig. 2, when the counter value is 0, the CPUs 1a-1d are in section 1, and each of the CPUs 1a-1d executes the synchronous processing of the unit processing corresponding to "counter value = 0". When the synchronous processing is completed, each of the CPUs 1a-1d sets its own termination flag 7a-7d. Then, each of the CPUs 1a-1d executes the processing not requiring synchronous processing (the slanted part following section 1 in Fig. 2) of the unit processing. Incidentally, if any of the termination flags 7a-7d is set, counter 13 is incremented by one (i.e., the LSB is set to "1").

[0035] If all CPUs 1a-1d set the completion flags 7a-7d, counter 13 is incremented by one increment, and then all of the completion flags 7a-7d are reset. Therefore, if all of the completion flags 7a-7d are set after all of the completion flags 7a-7d are reset, counter 13 is incremented by a total of two increments.

[0036] Therefore, when the processing not requiring synchronicity is completed, each of the CPUs 1a-1d refers to the counter value of the counter 13 and waits until the counter 13 is incremented by two.

[0037] When each of the CPUs 1a-1d detects that the counter 13 has advanced by two increments, each of the CPUs 1a-1d begins the processing requiring synchronicity (section 2 in Fig. 2), which in this example is in a subsequent unit processing and corresponds to "the counter value = 2". If the counter 13 has already been incremented by two increments at the time at which the processing not requiring synchronism is completed, a CPU 1 in the subsequent unit processing immediately starts processing requiring synchronism. That is, each of the CPUs 1a-1d starts the subsequent processing requiring synchronism after each of the CPUs 1a-1d detects that all of the CPUs 1a-1d complete the processing requiring synchronism of the current time.

[0038] If each of the CPUs 1a-1d enters section 2 in Fig. 2, each of the CPUs 1a-1d sets its own termination flag 7, and then executes the processing that does not require synchronicity (the hatched part shown in Fig. 2 follows section 2).

[0039] The identical operation sequence is repeated. When the counter value returns to 0 from a predetermined final value (that is, when all periodic processing is completed in a single cycle), each of the CPUs 1a-1d re-executes the unit processing corresponding to "counter value = 0."

[0040] The processing in each of the CPUs 1a-1d is described below with reference to Fig. 3 explained.

[0041] As in Fig. As shown in Figure 3, when CPU 1 starts operation, CPU 1 reads the counter value of counter 13 in S110. In S120, CPU 1 determines whether the LSB in counter 13 is 0 or not.

[0042] If CPU 1 determines that the LSB of counter 13 is not equal to 0 (S120: NO), processing returns to S110. If the LSB of counter 13 is equal to 1, processing returns to S110.

[0043] If it is determined that the LSB of counter 13 is 0 (S120: YES), CPU 1 determines that counter 13 has advanced by two increments and proceeds to S130. The situation that counter 12 has advanced by two increments means that the counter value is updated by AND circuit 16, and subsequent unit processing can be executed.

[0044] In S130, the CPU 1 jumps to a head address (specifically, a head address of a program of a task) of a task corresponding to the current counter value (namely, the counter value read in S110).

[0045] The task corresponds to unit processing. Incidentally, the task includes an instruction (corresponding to the exclusive instruction in the present embodiment) for setting the completion flag 7 of a corresponding CPU 1. The instruction is executed at S150. The ROM 2 stores a task table describing the head address of the task corresponding to the counter value. At S130, the CPU 1 refers to the task table, specifies the head address of the task corresponding to the current counter value, and jumps to the specified head address.

[0046] When the CPU 1 jumps to the head address of the task, the CPU 1 initially executes the processing requiring synchronicity among the tasks (S140).

[0047] When CPU 1 completes execution of processing requiring synchronization, CPU 1 sets its own completion flag 7 (S150), and then CPU 1 executes processing not requiring synchronization among the tasks (S160). Its own completion flag 7 may also be referred to as a corresponding completion flag 7 corresponding to CPU 1.

[0048] When CPU 1 completes processing that does not require synchronization, processing returns to S110. When the LSB of counter 13 becomes 0 (or the LSV is already 0), CPU 1 executes the processing after S130 again and executes the following unit processing (the task).

[0049] In the processors 11, the termination flags 7a-7d are provided for CPUs 1a-1d, respectively. Furthermore, a counter 13 common to the CPUs 1a-1d is provided. When one of the termination flags 7a-7d is set, the counter 13 is incremented by one. When all of the termination flags 7a-7d are set, the counter 13 is incremented by another increment, and the termination flags 7a-7d are reset.

[0050] Each of the CPUs 1a-1d executes the processing requiring synchronization in accordance with an even counter value updated by setting all of the completion flags 7a-7d. When each of the CPUs 1a-1d completes the processing requiring synchronization and sets the completion flag corresponding to each of the CPUs 1a-1d, each of the CPUs 1a-1d executes the processing not requiring synchronization.

[0051] In the processor 11, each of the CPUs 1a-1d can refer to the common counter 13 and perform processing requiring synchronization. Therefore, it is possible to reduce the overall processing load for synchronization compared with conventional technology. Therefore, it is possible to improve the efficiency of synchronization processing.

[0052] Each of the CPUs 1a-1d executes the synchronous processing according to the counter value. During a period after the synchronous processing is completed and the corresponding completion flag 7 is set before the subsequent synchronous processing begins, each of the CPUs 1a-1d executes the non-synchronous processing. Therefore, it is possible to further improve processing efficiency.

[0053] Assume that there is a section that does not need to be executed in every processing. In this case, when the LSB of counter 13 is 1, at least one of the CPUs 1a-1d can skip the processing corresponding to the section that does not need to be executed. In this case, it is possible to quickly switch to another processing and improve processing efficiency.

[0054] Each of the CPUs 1a-1d sets its own termination flags 7a-7d with a single exclusive instruction. This makes it possible to reduce the processing load. It is possible to quickly switch from processing that requires synchronization to processing that does not require synchronization.

[0055] Since manipulation (updating the value of the counter) of the counter 13 is performed by the exclusive hardware circuit different from the CPUs 1a-1d, it is possible to further reduce the processing load of the CPUs 1a-1d.

[0056] The number of bits of counter 13 is not necessarily 2 or more bits. The number of bits can be 1 bit, which is the smallest unit. That is, the number of bits can be arbitrarily determined. If the counter value overflows within one cycle of periodic control processing, the number of bits can be determined to detect an increment while taking overflow into account.

[0057] Incidentally, if multiple processing operations not requiring synchronization are ongoing in a subset of CPUs 1, the subset of CPUs 1 may execute multiple sections not requiring synchronization together. In this case, the CPU 1 executing the combined sections may wait until the counter value is incremented by increments equal to twice the number of combined sections before starting a subsequent section following the combined sections not requiring synchronization. The number of bits of counter 13 is assumed to be N. In this case, it is possible to combine 2^(N-1) or less of processing. (Second embodiment)

[0058] The processor in the second embodiment will be explained. Components and processing similar to the first embodiment will be given the same symbols as the first embodiment, and explanations will be omitted.

[0059] In comparison to the processor 11 in the first embodiment, a processor 21 in the second embodiment as shown in Fig. 4, the exclusive lines 9a-9d are not opened and the termination flag 7 corresponding to each of the CPUs 1a-1d is set via the bus 6. Therefore, each of the CPUs 1a-1d sets the termination flag 7 corresponding to each of the CPUs 1a-1d by a general software instruction.

[0060] For example, if the bit manipulation instruction for each of the completion flags 7a-7d is not present, each of the CPUs 1a-1d executes a read instruction, a calculation instruction, and a write instruction. According to the read instruction, all of the completion flags 7a-7d are read into an internal register as a single piece of data consisting of multiple bits. According to the calculation instruction, a "0" bit is replaced with a "1" only in the bit corresponding to the corresponding completion bit 7 among the read multiple bits. According to the write instruction, a piece of data is written to the completion flags 7a-7d after the calculation instruction is executed.

[0061] According to the processor 21 in the second embodiment, an effect similar to the first embodiment is obtained (except for the effect by the exclusive instruction). (Third embodiment)

[0062] A processor in the third embodiment does not include the AND circuit 16 and the adder circuit 17, compared to the processors 11, 21 in the first embodiment and the second embodiment. A single predetermined CPU (herein, for example, the CPU 1a) of the CPU 1 among the CPUs 1a-1d has functions similar to the AND circuit 16 and the adder circuit 17. The single CPU 1a allows, for example, access to the completion flags 7a-7d via the bus 6.

[0063] As in Fig. 5A and Fig. 5B, when the CPU 1a completes the processing of the unit processings requiring synchronism and sets the completion flag 7a, the CPU 1a executes the Fig. 5B, and then executes the processing that does not require synchronization. That is, the counter manipulation processing is performed between S150 and S160 by Fig. 3 in CPU 1a.

[0064] In S210, CPU 1a reads the completion flags 7a-7d in the counter manipulation processing. In S220, CPU 1a determines whether all of the completion flags 7a-7d are equal to "1" (that is, whether all of the completion flags 7a-7d are set). If all of the completion flags 7a-7d are not equal to "1," processing returns to S210.

[0065] If it is determined in S220 that all of the termination flags 7a-7d are equal to "1," processing proceeds to S230. In S230, the CPU 1a updates the counter value, and the counter 13 is incremented by one. For example, the CPU 1a reads the current counter value and writes a value to which 1 is added to the read value in the counter 13. In S240, the CPU 1a resets all of the termination flags 7a-7d, and then terminates the counter manipulation processing.

[0066] According to the processor in the third embodiment, the effect similar to that of the first and second embodiments is obtained. Incidentally, it may suffice for a single CPU among the plurality of CPUs to reference the completion flags. That is, only CPU 1a among the CPUs 1a-1d references the completion flags 7a-7d.

[0067] In a modified example, the counter manipulation processing can be Fig. 5B after processing that does not require synchronicity. (Fourth embodiment)

[0068] Compared with the processors 11, 21 in the first embodiment and the second embodiment, a processor in a fourth embodiment does not include the OR circuit 15, the AND circuit 16, and the adder circuit 17. In the present embodiment, a CPU 1 that sets the completion flag 7 first among the CPUs 1a-1d after all of the completion flags 7a-7d are reset has a function similar to the OR circuit 15, the AND circuit 16, and the adder circuit 17. The CPU 1 among the CPUs 1a-1d that sets the completion flag 7 first after all of the completion flags 7a-7d are reset is referred to as a leading CPU 1. Incidentally, the CPU 1 corresponds to an example of an initial CPU.

[0069] Therefore, when each of the CPUs 1a-1d completes the processing of the unit processings requiring synchronism and sets the corresponding completion flag 7a-7d corresponding to each of the CPUs 1a-1d, each of the CPUs 1a-1d executes the Fig. 6, and then executes the processing that does not require synchronization.

[0070] As in Fig. As described in Figure 6, each of the CPUs 1a-1d reads the completion flags 7a-7d in the counter manipulation processing in S200. Each of the CPUs 1a-1d determines in S205 whether only its own completion flag 7 is equal to "1" among all of the completion flags 7a-7d. If each of the CPUs 1a-1d determines a negative decision (S205: NO), that is, if a completion flag 7 other than its own completion flag 7 is also equal to "1," the counter manipulation processing is terminated.

[0071] When each of the CPUs 1a-1d determines an affirmative decision (S20: YES), that is, when only the corresponding termination flag 7 is "1," the processing proceeds to S207, and the LSB of the counter 13 is set to "1." In a case where a CPU 1 determines an affirmative decision, the CPU 1 corresponds to a CPU 1 that sets its own termination flag 7 first and corresponds to the leading CPU 1. Therefore, the above configuration has the function similar to the OR function 15.

[0072] The CPU 1 (the leading CPU 1) performing the processing at S207 performs processing identical to S210-S240 in Fig. 5B and was explained in the third embodiment. Accordingly, the CPU 1 has a function similar to the AND circuit 16 and the adder circuit 17. Then, the counter manipulation processing ends.

[0073] According to the processor in the fourth embodiment, it is possible to make the effect similar to the first embodiment and the second embodiment. Incidentally, each of the CPUs 1a-1d executes the processing of S200 and S205 only once in the counter manipulation processing of Fig. 6. Only a single CPU 1, which determines the affirmative decision at S205, performs the processing of S207-S240 among the CPUs 1a-1d.

[0074] As a modified example, when the OR circuit 15 is provided, it is possible to perform the processing of S207 in Fig. 6 to be removed.

[0075] Although embodiments have been described herein, the invention is not limited to a single embodiment, but may have various modes. Any numerical value in the present embodiments is an example and may have a different value.

[0076] For example, in the first embodiment and the third embodiment, the CPU 1a-1d may set "1" in the LSB of the counter 13 without providing the OR circuit 15. Specifically, at the time each of the CPUs 1a-1d sets the completion flag 7 corresponding to each of the CPUs 1a-1d, each of the CPUs 1a-1d may set "1" in the LSB in the counter 13.

[0077] The predetermined number is not limited to 1, but can be arbitrarily set to any number smaller than the total number of the CPU 1. For example, another circuit may be provided instead of the OR circuit 15. The circuit sets "1" to the LSB in the counter 13 when two or three of the completion flags 7a-7d are set. A manner for updating the counter value can also be arbitrarily determined. For example, the counter value may be incremented by two or three.

[0078] A function included in a single configuration element may be distributed among multiple configuration elements, and functions included in multiple configuration elements may be combined into a single configuration element. At least part of the configuration in the present embodiments may be replaced with a known configuration having an identical function. Part of the configuration in the present embodiments may be omitted. At least part of the configuration in one embodiment may be added to or replaced with the configuration in another embodiment. In addition to the processor, the invention can be provided by a control device and a system including the processor as a configuration element, a program executed by each CPU in the processor, a medium storing the program, a data processing method, and other various modes.

[0079] It is noted that a flowchart or a flowchart processing in the present application includes steps (also referred to as sections), each of which is represented as, for example, S110. Furthermore, each step may be divided into multiple substeps, and multiple steps may be combined into a single step.

[0080] While the data processing device has been described with reference to exemplary embodiments thereof, it should be understood that the invention is not limited to the exemplary embodiments and constructions. The data processing device is intended to cover various modifications and equivalent arrangements. While the various combinations and configurations have been described, other combinations and configurations involving more, fewer, or only a single element are also within the scope of the invention.< / verarbeitungsanordnung> < / abriss>

Claims

[1] Data processing device comprising: a variety of CPUs (1a-1d); a plurality of completion flags (7a-7d) each corresponding to the plurality of CPUs, each of the CPUs independently setting a corresponding completion flag corresponding to each of the CPUs, and each of the completion flags indicating execution completion of processing requiring synchronism; a counter (13) showing a state after a predetermined number of the completion flags are set and before all of the completion flags are set, based on a counter value, the predetermined number of completion flags corresponding to a part of a total number of completion flags of the CPUs; a first updating section (15, S207) that updates the counter value when the predetermined number of completion flags is set; and a second update section (16, 17, S210-S240) which further updates the counter value and resets all of the completion flags when the first update section updates the counter value and all of the completion flags are set, where: each of the CPUs executes the processing requiring synchronism in accordance with the counter value updated by the second update section (S110-S160); and after each of the CPUs completes the processing requiring synchronization and sets the corresponding completion flag, each of the CPUs executes processing not requiring synchronization. [2] A data processing device according to claim 1, wherein: at least one of the first updating section (15) and the second updating section (16, 17) is a hardware circuit. [3] Data processing apparatus according to claim 1 or 2, wherein: the first updating section (15) and the second updating section (16, 17) are a hardware circuit. [4] A data processing device according to claim 1, wherein: a single predetermined CPU of the CPUs functions as the second update section (S210-S240). [5] Data processing apparatus according to claim 1, wherein: an initial CPU is a CPU that sets the corresponding exit flag first among the CPUs after all of the exit flags are reset; and the initial CPU functions as the second update section (S210-S240). [6] Data processing apparatus according to claim 5, wherein: the predetermined number is equal to one; and the initial CPU also functions as the first update section (S207). [7] A data processing section according to any one of claims 1 to 6, wherein: each of the CPUs sets the corresponding termination flag through an exclusive instruction. [8] Data processing device according to one of claims 1 to 7, wherein: the predetermined number is equal to one; the first update section updates the counter value by setting one to a least significant bit of the counter if one of the completion flags is set; the second update section updates the counter value by advancing one increment if all of the termination flags are set; and the CPUs perform the processing requiring synchronization each time the counter value is increased by two.

Citation Information

Patent Citations

  • Common electronic control unit and forwarding program implemented therein

    DE102010038466A1

  • ELECTRONIC VEHICLE CONTROL SYSTEM, ELECTRONIC VEHICLE CONTROL UNIT AND VEHICLE CONTROL SYNCHRONIZATION METHOD

    DE112008004193B4

  • Control device for a vehicle

    DE112013001146T5

  • Synchronization method for multiprocessor system

    JP2005071109A

  • Support of a Plurality of Graphic Processing Units

    US20100115249A1