WO2024004414A1 - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
WO2024004414A1
WO2024004414A1 PCT/JP2023/018300 JP2023018300W WO2024004414A1 WO 2024004414 A1 WO2024004414 A1 WO 2024004414A1 JP 2023018300 W JP2023018300 W JP 2023018300W WO 2024004414 A1 WO2024004414 A1 WO 2024004414A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
trigger signal
dispatcher
execution
cycle
Prior art date
Application number
PCT/JP2023/018300
Other languages
French (fr)
Japanese (ja)
Inventor
一樹 本間
Original Assignee
日立Astemo株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Publication of WO2024004414A1 publication Critical patent/WO2024004414A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present invention relates to an information processing device mounted on a vehicle, and particularly to an information processing device capable of adjusting activation timing of tasks executed at a constant cycle.
  • a task executed at a fixed cycle may not be completed within the predetermined cycle due to various factors.
  • ECUs Electronic Control Units
  • Integrated ECUs which are a type of virtual machine that integrates multiple ECUs, and with this, the number of tasks executed within the Integrated ECUs has increased.
  • the problem of task processing not being completed within a predetermined period as described above is becoming more prominent.
  • FIG. 1 is a block diagram showing the hardware configuration of a general information processing device.
  • the information processing device (1) includes a ROM (Read Only Memory) (12), which is a storage device from which data can be read, a RAM (Random Access Memory) (13), which is a storage device from which data can be written and read, and data. It has a CPU (Central Processing Unit) (11) that calculates parameters necessary for vehicle control based on the above, and a communication module (10) that converts the calculation results into a communication protocol and transmits them.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • the information processing device (1) is, for example, a device that is mounted on a vehicle and controls the vehicle.
  • the information processing device (1) may not be mounted on the vehicle, and may be a device that controls an object other than the vehicle.
  • the information processing device (1) is connected to an external server (15) via a communication path (14).
  • the communication path (14) may physically include a plurality of communication buses, and the standards of each communication bus may be the same or different. Standards of these communication buses include CAN (registered trademark), LIN (registered trademark), FlexRay (registered trademark), and Ethernet (registered trademark).
  • the information processing device (1) receives data that has passed through the communication path (14). Then, in response to reception, the received data is developed in the RAM (13). Then, the CPU (11) performs calculations based on the written data in the RAM (13) and the read data in the ROM (12). Further, a program is pre-installed in the information processing device (1), and the CPU (11) executes the program, thereby making it possible to execute the processing described below.
  • Examples of the above-mentioned information processing device (1) include a map positioning unit (MPU) on an integrated ECU.
  • the following delays may occur in the application executed by the MPU on a route that periodically receives driving data from various sensors installed in the vehicle.
  • delays may occur between a container and a virtual machine due to task switching or interference with other containers, and in virtual I/O (Input/Output) between an application and a container, S/W (SoftWare) processing may occur.
  • delays may occur.
  • a container is a computer virtualization method in which a part of a running operating system (OS) is separated and a dedicated area is prepared isolated from the rest, and software is run on that area. In container virtualization technology, it refers to an isolated area.
  • OS running operating system
  • FIG. 11 is a block diagram showing an example of the configuration of an MPU in the prior art.
  • the MPU (100) has an RTOS (130), a timer (140), and an I/O (150), and executes task 1 (110), task 2 (111), and task 3 (112) at a certain period (for example, 10 ms). It is executed every time.
  • the MPU (100) is depicted as a single information processing device in FIG. 11, the MPU (100) may be executed as one virtual machine on an Integrated ECU, for example.
  • RTOS (130) is an abbreviation for "Real Time Operation System” and is a system that executes processing by a requested deadline. In recent years, they have been increasingly installed in devices that require real-time processing, particularly MPUs.
  • the RTOS (130) further includes a task dispatcher (131) and an I/O driver (132).
  • the task dispatcher (131) is one of the control function units included in the RTOS (130), and selects the task to be executed next from among multiple tasks in an executable state and allocates the right to use the CPU. Has a function.
  • the I/O driver (132) includes input/output control, file system, network protocol, etc., and has functions to control access to various data.
  • the timer (140) stores a preset period for each task, and sends a trigger signal (141) indicating the timing to start the task to the task dispatcher (131) at the timing when the task should be started. Send.
  • the timer (140) may be implemented in hardware or software, for example.
  • I/O (Input/Output) (150) is an interface for inputting and outputting data, and transmits and receives data between MPU (100) and external vehicle (160) via I/O (150). will be held.
  • All tasks are sequentially executed one by one in response to a start signal (121) from a task dispatcher (131), which is a task control device within the RTOS (130).
  • a completion signal (122) is a completion signal to inform the task dispatcher (131) that its execution is complete.
  • the task dispatcher (131) responds to a trigger signal (141) generated by a timer (140) installed in the MPU (100) at regular intervals of, for example, every 10 ms. Based on this, tasks 1 to 3 are started at regular intervals. However, the number of tasks executed within one cycle is arbitrary, and tasks having different cycles may be executed.
  • task 3 (112) transmits driving data (151) obtained in real time from the vehicle (160) to the communication path (133) from the I/O (150) and the I/O in the RTOS (130). It is assumed that execution is performed using the input value as an input value via the communication path (123) from the O driver (132).
  • FIGS. 12-13 show a time chart and a flowchart representing the processing in which each of tasks 1 to 3 is executed in the conventional technology.
  • the timer (140) generates a trigger signal (141) at a constant cycle.
  • a trigger signal (141) is set every 10 ms, but this period can be set arbitrarily.
  • the task dispatcher (131) goes into a busy state in response to it and sends task 1 (110), task 2 (111), and task 3 (112). They will start in order.
  • the task dispatcher (131) sends a start signal (121a) to task 1 (110), and starts task 1 (110).
  • Task 1 (110) starts processing in response to receiving the start signal (121a), and when the processing is completed, it sends a completion signal (122a) to the task dispatcher (131) to report that the processing has been completed. .
  • the task dispatcher (131) sends a start signal (121b) to task 2 (111) and starts task 2 (111).
  • Task 2 (111) starts processing in response to reception of the activation signal (121b), and when the processing is completed, sends a completion signal (122b) to the task dispatcher (131) to report that the processing has been completed. .
  • the task dispatcher (131) sends an activation signal (121c) to task 3 (112) to activate task 3 (112).
  • Task 3 (112) starts processing in response to receiving the activation signal (121c), and when the processing is completed, it sends a completion signal (122c) to the task dispatcher (131) to report that the processing has been completed.
  • task 3 (112) uses running data (151) obtained in real time from the vehicle (160) as an input value, so running data (151) that arrives every 10 ms is required for its activation. It is. In this case, since the running data (151) is earlier than the activation timing of task 3 (112) (timing of reception of activation signal 121c), task 3 (112) immediately processes it at the timing of reception of activation signal (121c). can be started.
  • FIG. 13 shows the above processing as a flowchart.
  • the task dispatcher (131) receives a trigger signal (141) from the timer (140).
  • a task is started in response to the reception, and in step S1303, when the processing of the task is completed, a completion signal is received from the task.
  • step S1304 it is determined whether the task that has sent the completion signal is the last task to be executed within the cycle, and if it is not the last task, the process returns to step S1302 and starts the next task, and if it is the last task, the next task is activated. End the process (cancel the busy state).
  • the above is the processing executed by the conventionally used MPU (100).
  • FIG. 14 shows a case in which a problem occurs in the prior art when the execution of a certain task is not completed within a predetermined 10 ms interval when each of the tasks 1 to 3 is executed.
  • the processing within the nth period and the processing up to the execution of task 2 (111) within the (n+1)th period are the same as those in FIG.
  • the task dispatcher (131) sends a start signal (121c) to task 3 (112) to try to start it.
  • some abnormality occurs in the communication path (133, 123) between the vehicle (160) and task 3 (112), and the driving data (151) is transferred to task 3 (112) within the (n+1)th period. ) may not be obtained at the time when the activation signal (121c) indicating the timing to activate the activation signal (121c) is generated.
  • task 3 (112) cannot immediately start its processing at the timing of receiving the start signal (121c), and task 3 (112) is also delayed by the delay (240) in receiving the driving data (151). 250).
  • the completion of task 3 (112) may be delayed until after the start timing of the next (n+2)th cycle.
  • the timer (140) since the timer (140) is programmed to generate the trigger signal (141) every 10ms, the (n+2)th cycle is started after 10ms have elapsed from the start of the (n+1)th cycle.
  • a trigger signal (141) is generated.
  • the task dispatcher (131) attempts to start task 1 (110), task 2 (111), and task 3 (112) in order, but at this point, the Processing of task 3 (112) has not yet been completed, and the task dispatcher (131) remains in a busy state.
  • the task dispatcher (131) attempts to put itself into a busy state in order to start task processing in the (n+2)th period in response to receiving the trigger signal from the timer (140). 131) will result in an inconsistency in the state.
  • task 3 (112) in the (n+1)th period is completed at timing 230.
  • the task dispatcher (131) may not be able to continue operating normally, or the processing of task 1 (110), task 2 (111), and task 3 (112) may not be able to continue correctly. Problems such as a decrease in the reliability of the content will occur.
  • Patent Document 1 describes a technology for supporting a location search service, which includes a periodic trigger service and a configuration of an invention that performs a location search, and further includes: A technique is disclosed for correcting received information when it does not match stored information.
  • the predetermined A case may occur in which the processing of a task is not completed within a certain period, and its completion is delayed until the next certain period, and the execution result of the entire task or the MPU (100) cannot be guaranteed.
  • a delay in task completion is not limited to a delay in driving data (151); for example, if the MPU (100) running in a virtual machine on an Integrated ECU is running on another virtual machine on the same Integrated ECU, It is obvious that various factors can be assumed, such as disturbances caused by applications running on the computer.
  • the present invention has been made in view of the above-mentioned problems, and even if a task executed at a fixed cycle does not complete its processing within a predetermined cycle due to some reason, each task or the MPU as a whole can operate normally.
  • the purpose of the present invention is to provide an information processing device that enables the continuation of
  • an information processing device includes a task execution unit that executes a plurality of tasks, a cycle generation unit that generates a first trigger signal at a predetermined cycle, and a first trigger signal.
  • a task execution management section that receives the signal and transmits a second trigger signal instructing the task execution section to start execution of a plurality of tasks, and the task execution management section is configured to monitor the execution status of the task execution section. The transmission timing of the second trigger signal is adjusted accordingly.
  • FIG. 1 is a block diagram showing the configuration of a general information processing device.
  • FIG. 2 is a block diagram showing an example of the configuration of an MPU according to the present invention.
  • FIG. 3 is a block diagram showing the configuration of a time keeper included in the MPU according to the present invention.
  • 5 is a time chart showing processing executed by the MPU according to the present invention when there is no delay in receiving travel data.
  • FIG. 3 is a sequence diagram showing an overview of processing executed within the MPU according to the present invention.
  • 5 is a time chart showing processing executed by the MPU according to the present invention when there is a delay in receiving travel data.
  • 2 is a flowchart showing the processing performed by the time keeper.
  • FIG. 5 is a time chart showing processing executed by an MPU according to a modification of the present invention.
  • 10 is a flowchart showing processing executed by the processing time keeper shown in FIG. 9;
  • FIG. 1 is a block diagram showing an example of the configuration of a conventional MPU.
  • 5 is a time chart showing an example of processing executed by a conventional MPU.
  • 2 is a flowchart showing processing executed by a task dispatcher in a conventional MPU.
  • FIG. 2 is a time chart for explaining problems that occur when there is a delay in receiving driving data when a conventional MPU is employed.
  • FIG. 1 is a block diagram showing an example of the configuration of a conventional MPU.
  • 5 is a time chart showing an example of processing executed by a conventional MPU.
  • 2 is a flowchart showing processing executed by a task dispatcher in a conventional MPU.
  • FIG. 2 is a time chart for explaining problems that occur when there is a delay in receiving driving data when a conventional MPU is employed
  • FIG. 2 is a block diagram showing the configuration of an MPU (100) according to an embodiment of the present invention.
  • the MPU (100) according to this embodiment is similar to the conventional MPU in that it executes task 1 (110), task 2 (111), and task 3 (112) at predetermined intervals.
  • the MPU (100) according to this embodiment differs from the conventional MPU (100) shown in FIG. 11 in that the RTOS (130) further includes a time keeper (300).
  • the task dispatcher (131) in the conventional MPU (100) directly receives the trigger signal (141) indicating the task activation timing from the timer (140) and activates each task.
  • the trigger signal (141) from the timer (140) is sent to the time keeper (300), and the task dispatcher (131) receives each trigger signal (320) from the time keeper (300).
  • the time keeper (300) sends messages to the task dispatcher (131) based on a trigger signal (141) at regular intervals of, for example, every 10 ms, which is generated by a timer (140) installed in the MPU (100).
  • the timing for activating tasks 1 to 3 at regular intervals is communicated by transmitting a trigger signal (320).
  • the timer (140) may be implemented in hardware or software, for example.
  • a task dispatcher (131) starts each task 1 to 3 at regular intervals based on a trigger signal (320) from a time keeper (300) installed in the RTOS (130).
  • the task dispatcher (131) also monitors the completion signal (122) coming from each task, and immediately sends a dispatcher completion signal (310) to the time keeper (300) when it confirms that all tasks have been completed. .
  • FIG. 3 shows an example of the configuration of the time keeper (300).
  • the time keeper (300) includes a dispatcher completion signal holding register (301) that holds the dispatcher completion signal (310), and a timer request holding register (302) that holds the trigger signal (141) from the timer (140). , has an AND device (303) that generates a trigger signal (320) when both the output (304) of the dispatcher completion signal holding register (301) and the output (305) of the timer request holding register (302) become valid. . Further, the dispatcher completion signal holding register (301) and timer request holding register (302) are set so that their contents are cleared when the trigger signal (320) is output.
  • holding the dispatcher completion signal (310) and trigger signal (141) means, for example, that each register has a flag, and the flag is set to 1 in response to the reception of the signal, and when reset, the flag is set to 1. This is accomplished by setting the flag to 0.
  • FIG. 4 is a time chart showing the processing executed by the MPU (100) according to the present embodiment when there is no delay in receiving driving data.
  • the time chart shown in FIG. 4 is the conventional time chart shown in FIG. 12 with processing by the time keeper (300) added, so only the processing related to the time keeper (300) will be described.
  • the time keeper (300) When the timer (140) generates a trigger signal (141) at a certain 10 ms period timing (for example, the start timing of the nth period), the time keeper (300) receives the trigger signal in the timer request holding register (302). Retains the information that came with it.
  • the AND device (303) since the dispatcher completion signal holding register (301) of the time keeper (300) holds the completion signal as an initial value, the AND device (303) receives the trigger signal (141) from the timer (140).
  • a trigger signal (320) is sent to the task dispatcher (131), and at the same time, the dispatcher completion signal holding register (301) and timer request holding register (302) are cleared.
  • the task dispatcher (131) In response to receiving the trigger signal (320), the task dispatcher (131) enters a busy state and sequentially starts task 1 (110), task 2 (111), and task 3 (112). This task activation process is the same as the conventional one.
  • FIG. 5 is a sequence diagram showing an overview of the above processing executed within the MPU (100) according to this embodiment.
  • the timer (140) generates a trigger signal at the start timing of each cycle and transmits it to the time keeper (300).
  • the time keeper (300) clears the contents of the dispatcher completion signal holding register (301) and the timer request holding register (302), and also informs the task dispatcher (131) of the startup timing of each task.
  • a trigger signal (320) notifying the user is transmitted.
  • the task dispatcher (131) sequentially activates tasks, and in step 505, receives a completion signal (122) from the task executed last within the period.
  • the task dispatcher (131) sends a dispatcher completion signal (310) to the time keeper (300) in step 506 in response to receiving the last completion signal.
  • the time keeper (300) holds the dispatcher completion signal (310) in the dispatcher completion signal holding register (301) and waits until receiving the next trigger signal (141) from the timer (140).
  • step S601 is added in addition to the process executed by the conventional task dispatcher (131) shown in FIG. Further, the trigger signal received in step S1301 is not the trigger signal (141) from the timer (140) but the trigger signal (320) from the time keeper (300).
  • the task dispatcher (131) in this embodiment determines in step S1304 that processing of all tasks to be executed within the period has been completed, it generates a dispatcher completion signal (310) and sends the time keeper (300) Send to.
  • the time keeper (300) accordingly holds this signal in the dispatcher completion signal holding register (301) as described above.
  • FIG. 7 shows a time chart representing the process executed by the MPU (100) according to the present embodiment when a delay in receiving driving data occurs. In FIG. 7, it is assumed that reception of travel data (151) is delayed in the (n+1)th cycle.
  • the processing within the n-th period is the same as that in FIG. 4 in which there is no delay in receiving driving data, and the task dispatcher (131) sequentially starts tasks 1 to 3, and receives a completion signal from the last task 3 (112). (122c), it sends a dispatcher complete signal (310) to the time keeper (300).
  • the time keeper (300) holds the reception information in the dispatcher completion signal holding register (301) upon reception.
  • the timer (140) generates a trigger signal (141) at the start timing of the (n+1)th period following the nth period, and transmits it to the time keeper (300). Then, the time keeper (300) holds the arrival of the trigger signal in the timer request holding register (302).
  • the dispatcher completion signal holding register (301) of the time keeper (300) is in a state of holding completion, so the AND unit (303) sends the trigger signal (320) to the task dispatcher (131) and at the same time Clear the dispatcher completion signal holding register (301) and timer request holding register (302).
  • the task dispatcher (131) goes into a busy state and starts task 1 (110), task 2 (111), and task 3 (112) in order.
  • the task dispatcher (131) After receiving the completion signal (122b) from task 2 (111), the task dispatcher (131) sends a start signal (121c) to start task 3 (112) to task 3 (112), and (112). However, as described above, in FIG. 7, there is a delay (240) in receiving the travel data (151) during the (n+1)th cycle.
  • the time counter in the timer (140) continues to operate, so that the timer (140) generates a trigger signal (141) for starting processing in the (n+2)th period, and transmits it to the time keeper (300).
  • the time keeper (300) holds information that the trigger signal (141) has arrived in a timer request holding register (302) in response to receiving the signal.
  • the task dispatcher (131) since the task dispatcher (131) has not received the completion signal (122c) from task 3 (112) at this point, it has not sent the dispatcher completion signal (310) to the time keeper (300).
  • the dispatcher completion signal holding register (301) of the time keeper (300) does not hold reception information of the dispatcher completion signal (310). Therefore, the signal generation conditions of the AND device (303) are not satisfied, and the generation of the trigger signal (320) by the time keeper (300) is put on hold.
  • the time keeper (300) When the task dispatcher (131) sends a dispatcher completion signal (310) to the time keeper (300) in response to receiving the completion signal (122c) from task 3 (112), the time keeper (300) The signal is held in the dispatcher completion signal holding register (301). Then, since the ON condition of the AND device (303) is satisfied, the time keeper (300) sends the trigger signal (320) notifying the start of the (n+2)th period to the task dispatcher (131) and at the same time sends the dispatcher completion signal. Clear the holding register (301) and timer request holding register (302). In response, the task dispatcher (131) goes into a busy state and starts task 1 (110), task 2 (111), and task 3 (112) in order. Thereafter, task 1 (110), task 2 (111), and task 3 (112) are processed according to the same flow as described above.
  • step S801 the time keeper (300) receives a trigger signal (141) from the timer (140) that notifies the start timing of a certain period.
  • step S802 the time keeper (300) refers to the dispatcher completion signal holding register (301) and determines whether the reception of the dispatcher completion signal (310) is held. If it is not held, it remains on standby; if it is held, the process moves to step S803, generates a trigger signal (320), and notifies the task dispatcher (131) of the start of processing.
  • the time keeper (300) keeps track of the task until the execution of all tasks is completed. - By suspending the generation of the trigger signal (320) that notifies the dispatcher (131) of the start of processing, even if the trigger signal (141) that notifies the start of the next cycle is received from the timer (140);
  • the task dispatcher (131) can continue to operate normally, and the processing of task 1 (110), task 2 (111), and task 3 (112) can also continue correctly.
  • FIG. 9 is a time chart showing the processing executed by the MPU (100) according to the modification
  • FIG. 10 is a flowchart showing the processing executed by the time keeper (300).
  • the time keeper (300) receives the dispatcher completion signal (310) from the task dispatcher (131), and from the time the time keeper (300) receives the dispatcher completion signal (310) from the timer (140).
  • a cycle period period (270) is measured, which is the time until the trigger signal (141) notifying the start of the (n+1) cycle is received. This can be measured, for example, by providing a time counter in each of the dispatcher completion signal holding register (301) and the timer request holding register (302), and obtaining the difference between the reception times.
  • the time keeper (300) compares the period until the execution of tasks 1-3 is completed with a predetermined period within the n-th cycle, and determines whether the period until the execution of tasks 1-3 is completed is the predetermined period.
  • the timer (140) is instructed to advance the start of the (n+2)th cycle by the shortened time (280). This can be determined by comparing the cycle period (270) with the difference between one cycle (10 ms in FIG. 9) and the predetermined period.
  • the predetermined period to be compared with the period until the execution of tasks 1-3 is completed is set within a range that does not cause the problem when the execution of the task is not completed within the period described above, It can be predetermined in consideration of the travel data reception interval, the worst execution time of each task, etc.
  • FIG. 10 is a flowchart showing the processing executed by the time keeper (300) in this modification.
  • the time keeper (300) receives a dispatcher completion signal (310) from the task dispatcher (131).
  • a trigger signal (141) notifying the start of the next cycle is received from the time keeper (300).
  • the time keeper (300) measures the cyclic period (270) as described above, and in step S1003 compares it with a threshold value corresponding to a predetermined period set in advance, and determines whether the cyclic period (270) is less than the threshold value.
  • step S1004 the time keeper (300) is instructed to perform the next cycle.
  • a signal instructing to shorten the generation cycle of the trigger signal (141) notifying the start is transmitted.
  • the information processing device includes a task execution unit that executes a plurality of tasks, a cycle generation unit that generates a first trigger signal at a predetermined cycle, and a task execution unit that receives the first trigger signal and a task execution management section that transmits a second trigger signal instructing the execution section to start execution of a plurality of tasks; the task execution management section transmits a second trigger signal according to the execution status of the task execution section; Adjust the trigger signal transmission timing.
  • the task execution management unit sends the first trigger signal to the cycle generation unit. Sends an instruction signal to shorten the generation cycle. This makes it possible to reduce the idle time during which the CPU does not operate, improves the efficiency of CPU usage, and can be expected to speed up task execution.
  • the task execution unit transmits an execution completion signal to the task execution management unit when execution of all the multiple tasks within the cycle is completed, and the task execution management unit sends the first trigger signal. After receiving the trigger signal, a second trigger signal is transmitted on condition that the execution completion signal is received.
  • the time keeper (300) suspends the generation of the trigger signal (320) that notifies the task dispatcher (131) of the start of processing until the execution of all tasks is completed. Even when the task dispatcher (131) receives a trigger signal (141) notifying the start of the next cycle, it is possible to continue operating normally.
  • MPU map information processing unit
  • the operation in a map information processing unit is explained as an example, but this is not limited to the MPU, and can be applied to general systems that perform periodic processing at regular intervals, for example. Conceivable.
  • the information processing system does not necessarily have to be an actual machine, and as mentioned above, it can be applied to, for example, an MPU built on an integrated ECU or an information processing system in general.
  • the present invention is not limited to the above embodiments, and various modifications are possible.
  • the above embodiments have been described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to embodiments having all the configurations described.
  • MPU information processing unit
  • Task dispatcher task execution unit
  • Timer cycle generation unit
  • 300 Time keeper (task execution management unit)

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Communication Control (AREA)

Abstract

This information processing device comprises: a task executing unit for executing a plurality of tasks; a cycle generating unit for generating a first trigger signal at a predetermined cycle; and a task execution management unit for receiving the first trigger signal and transmitting a second trigger signal to the task executing unit to instruct the commencement of execution of the plurality of tasks. The task execution management unit adjusts the transmission timing of the second trigger signal based on the execution status of the task executing unit.

Description

情報処理装置information processing equipment
 本発明は車両に搭載される情報処理装置に関し、特に、一定の周期で実行されるタスクの起動タイミングを調整可能な情報処理装置に関する。 TECHNICAL FIELD The present invention relates to an information processing device mounted on a vehicle, and particularly to an information processing device capable of adjusting activation timing of tasks executed at a constant cycle.
 車両等に搭載される情報処理装置において、一定の周期で実行されるタスクは様々な要因によりその実行が所定の周期内に終わらない場合がある。また、近年、自動車におけるECU(Electronic Control Unit)は複数のECUを統合した一種の仮想マシンであるIntegrated ECUとして実装される様になってきており、これに伴いIntegrated ECU内で実行されるタスク数も増加傾向にあり、上記のような所定の周期内にタスク処理が終了しない問題が顕著になりつつある。 In an information processing device installed in a vehicle or the like, a task executed at a fixed cycle may not be completed within the predetermined cycle due to various factors. Additionally, in recent years, ECUs (Electronic Control Units) in automobiles have come to be implemented as Integrated ECUs, which are a type of virtual machine that integrates multiple ECUs, and with this, the number of tasks executed within the Integrated ECUs has increased. There is also an increasing trend, and the problem of task processing not being completed within a predetermined period as described above is becoming more prominent.
 図1は、一般的な情報処理装置のハードウェア構成を示すブロック図である。情報処理装置(1)は、データの読み出しが可能な記憶装置であるROM(Read Only Memory)(12)、データの書き込みと読み出しの両方が可能であるRAM(Random Access Memory)(13)、データを基に車両制御に必要なパラメータの演算を行うCPU(Central Processing Unit)(11)、及び演算結果を通信用のプロトコルに変換して送信を行う通信モジュール(10)を保有している。 FIG. 1 is a block diagram showing the hardware configuration of a general information processing device. The information processing device (1) includes a ROM (Read Only Memory) (12), which is a storage device from which data can be read, a RAM (Random Access Memory) (13), which is a storage device from which data can be written and read, and data. It has a CPU (Central Processing Unit) (11) that calculates parameters necessary for vehicle control based on the above, and a communication module (10) that converts the calculation results into a communication protocol and transmits them.
 また、情報処理装置(1)は、たとえば車両に搭載され、車両を制御する装置である。ただし、情報処理装置(1)は車両に搭載されないものであってもよく、車両以外の対象を制御する装置であってもよい。 Further, the information processing device (1) is, for example, a device that is mounted on a vehicle and controls the vehicle. However, the information processing device (1) may not be mounted on the vehicle, and may be a device that controls an object other than the vehicle.
 情報処理装置(1)は、通信路(14)を介して外部サーバ(15)と接続されている。通信路(14)は、物理的には複数の通信バスを含んでもよく、各通信バスの規格はすべて同一でもよいし異なっていてもよい。これら通信バスの規格はCAN(登録商標)、LIN(登録商標)、FlexRay(登録商標)、イーサネット(登録商標)などである。 The information processing device (1) is connected to an external server (15) via a communication path (14). The communication path (14) may physically include a plurality of communication buses, and the standards of each communication bus may be the same or different. Standards of these communication buses include CAN (registered trademark), LIN (registered trademark), FlexRay (registered trademark), and Ethernet (registered trademark).
 情報処理装置(1)は通信路(14)を通過したデータを受信する。すると、受信に応じて、受信データがRAM(13)に展開される。そして、書き込まれたRAM(13)のデータとROM(12)の読み出しデータを基に、CPU(11)が演算を行う。また、情報処理装置(1)には予めプログラムが組み込まれており、CPU(11)が当該プログラムを実行することによって以下に説明する処理を実行することが可能になる。 The information processing device (1) receives data that has passed through the communication path (14). Then, in response to reception, the received data is developed in the RAM (13). Then, the CPU (11) performs calculations based on the written data in the RAM (13) and the read data in the ROM (12). Further, a program is pre-installed in the information processing device (1), and the CPU (11) executes the program, thereby making it possible to execute the processing described below.
 上述した情報処理装置(1)として、例えばIntegrated ECU上の地図情報処理ユニット(MPU:Map Positioning Unit)等が挙げられる。MPUが実行するアプリは自動車に搭載される各種センサからの走行データを周期的に受信する経路において以下の遅延が発生し得る。すなわち、コンテナと仮想マシンとの間においてはタスクスイッチや他のコンテナとの干渉による遅延が生じ得、アプリとコンテナ間の仮想I/O(Input/Output)においては、S/W(SoftWare)処理による遅延が生じ得る。ここで、コンテナとは、稼働中のオペレーティングシステム(OS)の一部を分離して他と隔離された専用のエリアを用意し、その上でソフトウェアを動作させるコンピュータの仮想方式の一つであるコンテナ型仮想化技術において、隔離された領域のことをいう。 Examples of the above-mentioned information processing device (1) include a map positioning unit (MPU) on an integrated ECU. The following delays may occur in the application executed by the MPU on a route that periodically receives driving data from various sensors installed in the vehicle. In other words, delays may occur between a container and a virtual machine due to task switching or interference with other containers, and in virtual I/O (Input/Output) between an application and a container, S/W (SoftWare) processing may occur. delays may occur. Here, a container is a computer virtualization method in which a part of a running operating system (OS) is separated and a dedicated area is prepared isolated from the rest, and software is run on that area. In container virtualization technology, it refers to an isolated area.
 これらの遅延の影響によりタスクがある一定期間(例えば10ms周期)内に終わらない場合、MPUの動作・出力結果を保証出来なくなる可能性がある。 If the task does not end within a certain period (for example, 10 ms cycle) due to the effects of these delays, there is a possibility that the operation and output results of the MPU cannot be guaranteed.
 ここで、従来技術におけるMPUの構成及び実行される処理を図11-14を用いて説明する。図11は、従来技術におけるMPUの構成の一例を示すブロック図である。MPU(100)は、RTOS(130)、タイマー(140)、I/O(150)を有し、タスク1(110)、タスク2(111)、タスク3(112)をある周期(例えば10ms)毎に実行するものである。図11においてMPU(100)は単独の情報処理装置として描かれているが、例えばMPU(100)をIntegrated ECU上の1つの仮想マシンとして実行する形態でも良い。なお、実施例を含め以降では本発明に係る情報処理装置として車載ECUの1つであるMPUを例に説明するが、本発明の適用範囲は車載MPUに限定されることはなく、周期的にデータを受信して処理を実行するECU全てに適用可能である。 Here, the configuration of the MPU and the processing executed in the conventional technology will be explained using FIGS. 11-14. FIG. 11 is a block diagram showing an example of the configuration of an MPU in the prior art. The MPU (100) has an RTOS (130), a timer (140), and an I/O (150), and executes task 1 (110), task 2 (111), and task 3 (112) at a certain period (for example, 10 ms). It is executed every time. Although the MPU (100) is depicted as a single information processing device in FIG. 11, the MPU (100) may be executed as one virtual machine on an Integrated ECU, for example. Note that although the information processing device according to the present invention, including the embodiments, will be explained using an MPU, which is one of the in-vehicle ECUs, as an example, the scope of application of the present invention is not limited to the in-vehicle MPU, and It is applicable to all ECUs that receive data and execute processing.
 RTOS(130)は、「Real Time Operation System」の略称であり、要求される期限までに処理を実行するシステムのことである。近年では、特にMPU等の、処理にリアルタイム性が要求される機器に搭載されることが多くなっている。RTOS(130)はさらにタスク・ディスパッチャ(131)とI/Oドライバ(132)を有する。タスク・ディスパッチャ(131)は、RTOS(130)が有する制御機能部の1つであり、実行可能状態にある複数のタスクの中から次に実行すべきタスクを選択してCPUの使用権を割り当てる機能を有する。I/Oドライバ(132)は、入出力制御、ファイルシステム、ネットワークプロトコルなどを含み、各種データへのアクセスを制御する機能を有する。 RTOS (130) is an abbreviation for "Real Time Operation System" and is a system that executes processing by a requested deadline. In recent years, they have been increasingly installed in devices that require real-time processing, particularly MPUs. The RTOS (130) further includes a task dispatcher (131) and an I/O driver (132). The task dispatcher (131) is one of the control function units included in the RTOS (130), and selects the task to be executed next from among multiple tasks in an executable state and allocates the right to use the CPU. Has a function. The I/O driver (132) includes input/output control, file system, network protocol, etc., and has functions to control access to various data.
 タイマー(140)は、タスク毎に予め設定された周期を記憶しており、タスクを起動すべきタイミングで、タスク・ディスパッチャ(131)に対してタスクを起動するタイミングを示すトリガ信号(141)を送信する。タイマー(140)は例えばハードウェア的に実装されても良いし、ソフトウェア的に実装されても良い。 The timer (140) stores a preset period for each task, and sends a trigger signal (141) indicating the timing to start the task to the task dispatcher (131) at the timing when the task should be started. Send. The timer (140) may be implemented in hardware or software, for example.
 I/O(Input/Output)(150)は、データの入出力を行うインターフェースであり、I/O(150)を介してMPU(100)と外部の車両(160)との間でデータの送受信が行われる。 I/O (Input/Output) (150) is an interface for inputting and outputting data, and transmits and receives data between MPU (100) and external vehicle (160) via I/O (150). will be held.
 全てのタスクはRTOS(130)内のタスク制御装置であるタスク・ディスパッチャ(131)からの起動信号(121)を契機に1つずつ順番に実行される。それぞれのタスクはその実行が完了した際、完了信号(122)を用いてその実行が完了したことをタスク・ディスパッチャ(131)に伝える。 All tasks are sequentially executed one by one in response to a start signal (121) from a task dispatcher (131), which is a task control device within the RTOS (130). When each task completes its execution, it uses a completion signal (122) to inform the task dispatcher (131) that its execution is complete.
 なお、実施例も含め、本明細書においては、タスク・ディスパッチャ(131)はMPU(100)内に設置されたタイマー(140)で生成される例えば10ms毎の一定間隔のトリガ信号(141)に基づいて、タスク1~3を一定間隔で起動していくものとする。しかし、1周期内で実行されるタスク数は任意であり、また異なる周期を有するタスクが実行されることもある。 In this specification, including the embodiments, the task dispatcher (131) responds to a trigger signal (141) generated by a timer (140) installed in the MPU (100) at regular intervals of, for example, every 10 ms. Based on this, tasks 1 to 3 are started at regular intervals. However, the number of tasks executed within one cycle is arbitrary, and tasks having different cycles may be executed.
 また、タスク3(112)はその処理において、車両(160)からリアルタイムで得られる走行データ(151)をI/O(150)からの通信路(133)、およびRTOS(130)内のI/Oドライバ(132)からの通信路(123)を経由して入力値として用いて実行するものとする。 In addition, in its processing, task 3 (112) transmits driving data (151) obtained in real time from the vehicle (160) to the communication path (133) from the I/O (150) and the I/O in the RTOS (130). It is assumed that execution is performed using the input value as an input value via the communication path (123) from the O driver (132).
 図12-13に、従来技術における、それぞれのタスク1~3が実行される処理を表すタイムチャート及びフローチャートを示す。 FIGS. 12-13 show a time chart and a flowchart representing the processing in which each of tasks 1 to 3 is executed in the conventional technology.
 図12のタイムチャートに示すように、タイマー(140)は一定周期でトリガ信号(141)を生成する。ここでは例として10ms毎とするが、この周期は任意に設定可能である。タイマー(140)が第n周期においてトリガ信号(141)を生成すると、それを受けてタスク・ディスパッチャ(131)はbusy状態となりタスク1(110)、タスク2(111)、タスク3(112)を順番に起動していく。 As shown in the time chart of FIG. 12, the timer (140) generates a trigger signal (141) at a constant cycle. Here, as an example, it is set every 10 ms, but this period can be set arbitrarily. When the timer (140) generates a trigger signal (141) in the n-th period, the task dispatcher (131) goes into a busy state in response to it and sends task 1 (110), task 2 (111), and task 3 (112). They will start in order.
 具体的には、先ずタスク・ディスパッチャ(131)はタスク1(110)に起動信号(121a)を送信し、タスク1(110)を起動する。タスク1(110)は起動信号(121a)の受信に応じて処理を開始し、その処理が完了すると完了信号(122a)をタスク・ディスパッチャ(131)に送信し、処理が完了したことを報告する。 Specifically, first, the task dispatcher (131) sends a start signal (121a) to task 1 (110), and starts task 1 (110). Task 1 (110) starts processing in response to receiving the start signal (121a), and when the processing is completed, it sends a completion signal (122a) to the task dispatcher (131) to report that the processing has been completed. .
 次にタスク・ディスパッチャ(131)はタスク2(111)に起動信号(121b)を送信し、タスク2(111)を起動する。タスク2(111)は起動信号(121b)の受信に応じて処理を開始し、その処理が完了すると完了信号(122b)をタスク・ディスパッチャ(131)に送信し、処理が完了したことを報告する。 Next, the task dispatcher (131) sends a start signal (121b) to task 2 (111) and starts task 2 (111). Task 2 (111) starts processing in response to reception of the activation signal (121b), and when the processing is completed, sends a completion signal (122b) to the task dispatcher (131) to report that the processing has been completed. .
 更にタスク・ディスパッチャ(131)は起動信号(121c)をタスク3(112)に送信し、タスク3(112)を起動する。タスク3(112)は起動信号(121c)の受信に応じて処理を開始し、その処理が完了すると完了信号(122c)をタスク・ディスパッチャ(131)に送信し、処理が完了したことを報告する。ここで、上述の通りタスク3(112)は車両(160)からリアルタイムで得られる走行データ(151)を入力値として用いるため、その起動には、10ms毎に到着する走行データ(151)が必要である。このケースでは走行データ(151)がタスク3(112)の起動タイミング(起動信号121cの受信タイミング)よりも先であるため、タスク3(112)は起動信号(121c)受信のタイミングで直ぐにその処理を開始する事が出来る。 Furthermore, the task dispatcher (131) sends an activation signal (121c) to task 3 (112) to activate task 3 (112). Task 3 (112) starts processing in response to receiving the activation signal (121c), and when the processing is completed, it sends a completion signal (122c) to the task dispatcher (131) to report that the processing has been completed. . Here, as mentioned above, task 3 (112) uses running data (151) obtained in real time from the vehicle (160) as an input value, so running data (151) that arrives every 10 ms is required for its activation. It is. In this case, since the running data (151) is earlier than the activation timing of task 3 (112) (timing of reception of activation signal 121c), task 3 (112) immediately processes it at the timing of reception of activation signal (121c). can be started.
 最後にタスク・ディスパッチャ(131)は第n周期内に実行されるべき最後のタスクであるタスク3(112)から実行完了を示す完了信号(122c)を受信すると、当該10msの第n周期内に実行すべきタスクは全て終了したものと見なして、busy状態を取り下げる。 Finally, when the task dispatcher (131) receives a completion signal (122c) indicating completion of execution from task 3 (112), which is the last task to be executed within the n-th cycle, It is assumed that all tasks to be executed have been completed, and the busy state is canceled.
 同様に第(n+1)周期、第(n+2)周期と連続して処理が実行される。 Similarly, the process is executed continuously in the (n+1)th period and the (n+2)th period.
 図13に上述の処理をフローチャートとして示す。まずステップS1301において、タスク・ディスパッチャ(131)がタイマー(140)からトリガ信号(141)を受信する。ステップS1302において、該受信に応じてタスクを起動し、ステップS1303において該タスクの処理が完了するとタスクから完了信号を受信する。ステップS1304において、完了信号を送信してきたタスクが該周期内において最後に実行されるべきタスクであったか否か判定し、最後でなければステップS1302へと戻り次のタスクを起動し、最後であれば処理を終了する(busy状態を取り下げる)。以上が、従来用いられてきたMPU(100)が実行する処理である。 FIG. 13 shows the above processing as a flowchart. First, in step S1301, the task dispatcher (131) receives a trigger signal (141) from the timer (140). In step S1302, a task is started in response to the reception, and in step S1303, when the processing of the task is completed, a completion signal is received from the task. In step S1304, it is determined whether the task that has sent the completion signal is the last task to be executed within the cycle, and if it is not the last task, the process returns to step S1302 and starts the next task, and if it is the last task, the next task is activated. End the process (cancel the busy state). The above is the processing executed by the conventionally used MPU (100).
 図14に、従来技術における、それぞれのタスク1~3が実行される際にあるタスクの実行が所定の10ms間隔内に完了しない事により問題が発生するケースについて示す。図14において、第n周期内における処理、及び第(n+1)周期内におけるタスク2(111)の実行までの処理は図12と同様である。 FIG. 14 shows a case in which a problem occurs in the prior art when the execution of a certain task is not completed within a predetermined 10 ms interval when each of the tasks 1 to 3 is executed. In FIG. 14, the processing within the nth period and the processing up to the execution of task 2 (111) within the (n+1)th period are the same as those in FIG.
 第(n+1)周期内において、タスク・ディスパッチャ(131)はタスク2(111)から完了信号(122b)を受信後、起動信号(121c)をタスク3(112)に送信して起動しようとする。ここで、車両(160)とタスク3(112)との間の通信路(133、123)に何等かの異常が生じ、第(n+1)周期内において走行データ(151)が、タスク3(112)を起動すべきタイミングを示す起動信号(121c)の生成時点で得られない場合が生じ得る。この場合、タスク3(112)は起動信号(121c)受信のタイミングで直ぐにその処理を開始する事が出来ず、走行データ(151)受信の遅延(240)分だけタスク3(112)も遅延(250)して起動されることになる。その場合、結果的にタスク3(112)が完了するのは次の第(n+2)周期の開始タイミングの後まで遅れる事態が生じ得る。 Within the (n+1)th cycle, after receiving the completion signal (122b) from task 2 (111), the task dispatcher (131) sends a start signal (121c) to task 3 (112) to try to start it. Here, some abnormality occurs in the communication path (133, 123) between the vehicle (160) and task 3 (112), and the driving data (151) is transferred to task 3 (112) within the (n+1)th period. ) may not be obtained at the time when the activation signal (121c) indicating the timing to activate the activation signal (121c) is generated. In this case, task 3 (112) cannot immediately start its processing at the timing of receiving the start signal (121c), and task 3 (112) is also delayed by the delay (240) in receiving the driving data (151). 250). In that case, the completion of task 3 (112) may be delayed until after the start timing of the next (n+2)th cycle.
 上記の状態においては、タイマー(140)は10ms毎にトリガ信号(141)を生成するようプログラムされているため、第(n+1)周期開始時点から10ms経過後に、第(n+2)周期を開始させるためのトリガ信号(141)を生成する。それを受けてタスク・ディスパッチャ(131)はタスク1(110)、タスク2(111)、タスク3(112)を順番に起動して行こうとするが、この時点では第(n+1)周期内におけるタスク3(112)の処理は未だ完了しておらず、タスク・ディスパッチャ(131)は依然busy状態のままである。一方でタスク・ディスパッチャ(131)はタイマー(140)からのトリガ信号受信に応じて第(n+2)周期のタスク処理を起動するために自らの状態をbusy状態にしようとするため、タスク・ディスパッチャ(131)の状態に不整合が生じることになる。 In the above state, since the timer (140) is programmed to generate the trigger signal (141) every 10ms, the (n+2)th cycle is started after 10ms have elapsed from the start of the (n+1)th cycle. A trigger signal (141) is generated. In response, the task dispatcher (131) attempts to start task 1 (110), task 2 (111), and task 3 (112) in order, but at this point, the Processing of task 3 (112) has not yet been completed, and the task dispatcher (131) remains in a busy state. On the other hand, the task dispatcher (131) attempts to put itself into a busy state in order to start task processing in the (n+2)th period in response to receiving the trigger signal from the timer (140). 131) will result in an inconsistency in the state.
 このため、仮に本来よりも遅れたタイミングでタスク3(112)の完了がタスク・ディスパッチャ(131)に報告されても、タイミング230の時点において、第(n+1)周期におけるタスク3(112)の完了信号(122c)の受信とタイマー(140)による第(n+2)周期の開始を通知するトリガ信号(141)の受信とが重複してしまい、タスク・ディスパッチャ(131)は現状のbusy状態を以前の一連のタスク処理に該当するものとして解除して良いのか、あるいは次の一連のタスク処理に該当するためbusy状態を継続すべきなのか判断が出来ない。この不整合によりタスク・ディスパッチャ(131)が正常に動作を継続出来ない事態に陥る、あるいはタスク1(110)、タスク2(111)、タスク3(112)の処理が正しく継続出来なくなり、その処理内容の信頼性が低下する、などの問題が発生することになる。 Therefore, even if the completion of task 3 (112) is reported to the task dispatcher (131) at a later timing than originally expected, task 3 (112) in the (n+1)th period is completed at timing 230. The reception of the signal (122c) and the reception of the trigger signal (141) notifying the start of the (n+2)th period by the timer (140) overlap, and the task dispatcher (131) replaces the current busy state with the previous one. It is not possible to determine whether the task should be canceled because it corresponds to a series of task processing, or whether the busy state should be continued because it corresponds to the next series of task processing. Due to this inconsistency, the task dispatcher (131) may not be able to continue operating normally, or the processing of task 1 (110), task 2 (111), and task 3 (112) may not be able to continue correctly. Problems such as a decrease in the reliability of the content will occur.
 上記技術に関連して、特許文献1には、位置探索サービスをサポートするための技術であって、周期的トリガーサービスを有し、位置探索を実施する発明の構成が記載されており、さらに、受信した情報が蓄積された情報と適合しない場合に修正する技術が開示されている。 In relation to the above technology, Patent Document 1 describes a technology for supporting a location search service, which includes a periodic trigger service and a configuration of an invention that performs a location search, and further includes: A technique is disclosed for correcting received information when it does not match stored information.
特開2013-048444号公報Japanese Patent Application Publication No. 2013-048444
 図14の例で示した通り、一定周期で実行され、かつその起動に走行データ(151)の到着が必要となるタスクがある場合、走行データ(151)の到着が遅れること等の理由で所定の一定周期内にタスクの処理が完了せず、次の一定周期までその完了が遅れてしまい、全体のタスクないしMPU(100)の実行結果が保証出来ないケースが起こりえる。なおこの様なタスクの完了の遅れは走行データ(151)の遅延に限った事では無く、例えばIntegrated ECU上の仮想マシンで実行されているMPU(100)が同一Integrated ECU上の他の仮想マシンで実行されているアプリケーションによる外乱を受けること、等の様々な要因が想定される事は自明である。 As shown in the example of FIG. 14, if there is a task that is executed at a fixed period and requires the arrival of travel data (151) for its activation, the predetermined A case may occur in which the processing of a task is not completed within a certain period, and its completion is delayed until the next certain period, and the execution result of the entire task or the MPU (100) cannot be guaranteed. Note that such a delay in task completion is not limited to a delay in driving data (151); for example, if the MPU (100) running in a virtual machine on an Integrated ECU is running on another virtual machine on the same Integrated ECU, It is obvious that various factors can be assumed, such as disturbances caused by applications running on the computer.
 本発明は、上記課題に鑑みてなされたものであり、一定周期で実行されるタスクが何らかの要因により所定の周期内に処理が完了しない場合であっても、各タスクないしMPU全体として正常な動作を継続可能とする情報処理装置を提供することを目的としている。 The present invention has been made in view of the above-mentioned problems, and even if a task executed at a fixed cycle does not complete its processing within a predetermined cycle due to some reason, each task or the MPU as a whole can operate normally. The purpose of the present invention is to provide an information processing device that enables the continuation of
 上述の目的を実現するために、本発明に係る情報処理装置は、複数のタスクを実行するタスク実行部と、所定の周期で第一のトリガ信号を生成する周期生成部と、第一のトリガ信号を受信し、タスク実行部に対して複数のタスクの実行開始を指示する第二のトリガ信号を送信するタスク実行管理部と、を有し、タスク実行管理部は、タスク実行部の実行状況に応じて第二のトリガ信号の送信タイミングを調整する。 In order to achieve the above object, an information processing device according to the present invention includes a task execution unit that executes a plurality of tasks, a cycle generation unit that generates a first trigger signal at a predetermined cycle, and a first trigger signal. a task execution management section that receives the signal and transmits a second trigger signal instructing the task execution section to start execution of a plurality of tasks, and the task execution management section is configured to monitor the execution status of the task execution section. The transmission timing of the second trigger signal is adjusted accordingly.
 本発明によれば、一定周期で実行されるタスクが何らかの要因により所定の周期内に処理が完了しない場合であっても、各タスクないしMPU全体として正常な動作を継続させることが可能となる。
 本発明に関連する更なる特徴は、本明細書の記述、添付図面から明らかになるものである。また、上記した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。
According to the present invention, even if a task executed at a constant cycle does not complete its processing within a predetermined cycle due to some reason, it is possible to continue the normal operation of each task or the MPU as a whole.
Further features related to the invention will become apparent from the description herein and the accompanying drawings. Further, problems, configurations, and effects other than those described above will be made clear by the description of the following examples.
一般的な情報処理装置の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of a general information processing device. 本発明に係るMPUの構成の一例を示すブロック図。FIG. 2 is a block diagram showing an example of the configuration of an MPU according to the present invention. 本発明に係るMPUが有するタイム・キーパーの構成を示すブロック図。FIG. 3 is a block diagram showing the configuration of a time keeper included in the MPU according to the present invention. 走行データ受信の遅延が生じていない場合に本発明に係るMPUが実行する処理を示すタイムチャート。5 is a time chart showing processing executed by the MPU according to the present invention when there is no delay in receiving travel data. 本発明に係るMPU内にて実行される処理の概要を示すシーケンス図。FIG. 3 is a sequence diagram showing an overview of processing executed within the MPU according to the present invention. タスク・ディスパッチャが実行する処理を示すフローチャート。Flowchart illustrating processing performed by a task dispatcher. 走行データ受信の遅延が生じた場合に本発明に係るMPUが実行する処理を示すタイムチャート。5 is a time chart showing processing executed by the MPU according to the present invention when there is a delay in receiving travel data. タイム・キーパーが実行する処理を示すフローチャート。2 is a flowchart showing the processing performed by the time keeper. 本発明の変形例に係るMPUが実行する処理を示すタイムチャート。5 is a time chart showing processing executed by an MPU according to a modification of the present invention. 図9に示す処理中タイム・キーパーが実行する処理を示すフローチャート。10 is a flowchart showing processing executed by the processing time keeper shown in FIG. 9; 従来のMPUの構成の一例を示すブロック図。FIG. 1 is a block diagram showing an example of the configuration of a conventional MPU. 従来のMPUが実行する処理の一例を示すタイムチャート。5 is a time chart showing an example of processing executed by a conventional MPU. 従来のMPUにおいてタスク・ディスパッチャが実行する処理を示すフローチャート。2 is a flowchart showing processing executed by a task dispatcher in a conventional MPU. 従来のMPUを採用した場合に、走行データ受信の遅延が生じた場合に生じる問題点を説明するためのタイムチャート。FIG. 2 is a time chart for explaining problems that occur when there is a delay in receiving driving data when a conventional MPU is employed. FIG.
 以下、本発明の実施形態について、図面を用いて説明する。
 図2は、本発明の一実施例に係るMPU(100)の構成を示すブロック図である。本実施例に係るMPU(100)は、所定の周期毎にタスク1(110)、タスク2(111)、タスク3(112)を実行する点においては従来と同様である。本実施例に係るMPU(100)が図11に示した従来のMPU(100)と異なる点は、RTOS(130)内にさらにタイム・キーパー(300)を備える点である。従来のMPU(100)におけるタスク・ディスパッチャ(131)はタイマー(140)からのタスクの起動タイミングを示すトリガ信号(141)を直接受信し、各タスクを起動していたが、本実施例においては、タイマー(140)からのトリガ信号(141)はタイム・キーパー(300)に送信され、タスク・ディスパッチャ(131)は、タイム・キーパー(300)からのトリガ信号(320)の受信に応じて各タスクを起動する。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 2 is a block diagram showing the configuration of an MPU (100) according to an embodiment of the present invention. The MPU (100) according to this embodiment is similar to the conventional MPU in that it executes task 1 (110), task 2 (111), and task 3 (112) at predetermined intervals. The MPU (100) according to this embodiment differs from the conventional MPU (100) shown in FIG. 11 in that the RTOS (130) further includes a time keeper (300). The task dispatcher (131) in the conventional MPU (100) directly receives the trigger signal (141) indicating the task activation timing from the timer (140) and activates each task. , the trigger signal (141) from the timer (140) is sent to the time keeper (300), and the task dispatcher (131) receives each trigger signal (320) from the time keeper (300). Launch a task.
 タイム・キーパー(300)はMPU(100)内に設置されたタイマー(140)で生成される例えば10ms毎の一定間隔のトリガ信号(141)に基づいて、タスク・ディスパッチャ(131)に対してそれぞれのタスク1~3を一定間隔で起動していくタイミングをトリガ信号(320)の送信により伝える。タイマー(140)は例えばハードウェア的に実装されても良いし、ソフトウェア的に実装されても良い。 The time keeper (300) sends messages to the task dispatcher (131) based on a trigger signal (141) at regular intervals of, for example, every 10 ms, which is generated by a timer (140) installed in the MPU (100). The timing for activating tasks 1 to 3 at regular intervals is communicated by transmitting a trigger signal (320). The timer (140) may be implemented in hardware or software, for example.
 タスク・ディスパッチャ(131)はRTOS(130)内に設置されたタイム・キーパー(300)からのトリガ信号(320)に基づいて、それぞれのタスク1~3を一定間隔で起動していく。またタスク・ディスパッチャ(131)はそれぞれのタスクから来る完了信号(122)を監視し、全てのタスクの実行が完了したのを確認すると直ちにディスパッチャ完了信号(310)をタイム・キーパー(300)に伝える。 A task dispatcher (131) starts each task 1 to 3 at regular intervals based on a trigger signal (320) from a time keeper (300) installed in the RTOS (130). The task dispatcher (131) also monitors the completion signal (122) coming from each task, and immediately sends a dispatcher completion signal (310) to the time keeper (300) when it confirms that all tasks have been completed. .
 図3にタイム・キーパー(300)の構成例を示す。タイム・キーパー(300)はディスパッチャ完了信号(310)を保持しておくディスパッチャ完了信号保持レジスタ(301)、タイマー(140)からのトリガ信号(141)を保持しておくタイマー要求保持レジスタ(302)、ディスパッチャ完了信号保持レジスタ(301)の出力(304)およびタイマー要求保持レジスタ(302)の出力(305)が共に有効になった際にトリガ信号(320)を生成するAND器(303)を有する。またディスパッチャ完了信号保持レジスタ(301)およびタイマー要求保持レジスタ(302)はトリガ信号(320)が出力されるとその内容がクリアされるように設定されている。なお、「ディスパッチャ完了信号(310)及びトリガ信号(141)を保持」するとは、例えば各レジスタがフラグを有しており、信号の受信に応じてフラグを1に設定し、リセットする際にはフラグを0にする、といった方法で実現される。 FIG. 3 shows an example of the configuration of the time keeper (300). The time keeper (300) includes a dispatcher completion signal holding register (301) that holds the dispatcher completion signal (310), and a timer request holding register (302) that holds the trigger signal (141) from the timer (140). , has an AND device (303) that generates a trigger signal (320) when both the output (304) of the dispatcher completion signal holding register (301) and the output (305) of the timer request holding register (302) become valid. . Further, the dispatcher completion signal holding register (301) and timer request holding register (302) are set so that their contents are cleared when the trigger signal (320) is output. Note that "holding the dispatcher completion signal (310) and trigger signal (141)" means, for example, that each register has a flag, and the flag is set to 1 in response to the reception of the signal, and when reset, the flag is set to 1. This is accomplished by setting the flag to 0.
 図4は、走行データ受信の遅延が生じていない場合に、本実施例に係るMPU(100)が実行する処理を示すタイムチャートである。なお、図4に示すタイムチャートは、図12に示す従来例におけるタイムチャートにタイム・キーパー(300)による処理が加わったものであるため、タイム・キーパー(300)に関わる処理についてのみ説明する。 FIG. 4 is a time chart showing the processing executed by the MPU (100) according to the present embodiment when there is no delay in receiving driving data. The time chart shown in FIG. 4 is the conventional time chart shown in FIG. 12 with processing by the time keeper (300) added, so only the processing related to the time keeper (300) will be described.
 タイマー(140)がある10ms周期のタイミング(例えば第n周期の開始タイミング)でトリガ信号(141)を生成すると、それを受けてタイム・キーパー(300)はタイマー要求保持レジスタ(302)にトリガ信号が来た情報を保持する。ここでタイム・キーパー(300)のディスパッチャ完了信号保持レジスタ(301)は初期値として完了信号を保持した状態であるため、AND器(303)はタイマー(140)からのトリガ信号(141)の受信に応じてトリガ信号(320)をタスク・ディスパッチャ(131)に送信すると同時にディスパッチャ完了信号保持レジスタ(301)とタイマー要求保持レジスタ(302)をクリアする。トリガ信号(320)の受信に応じてタスク・ディスパッチャ(131)はbusy状態となりタスク1(110)、タスク2(111)、タスク3(112)を順番に起動していく。このタスク起動処理については従来と同様である。 When the timer (140) generates a trigger signal (141) at a certain 10 ms period timing (for example, the start timing of the nth period), the time keeper (300) receives the trigger signal in the timer request holding register (302). Retains the information that came with it. Here, since the dispatcher completion signal holding register (301) of the time keeper (300) holds the completion signal as an initial value, the AND device (303) receives the trigger signal (141) from the timer (140). In response to this, a trigger signal (320) is sent to the task dispatcher (131), and at the same time, the dispatcher completion signal holding register (301) and timer request holding register (302) are cleared. In response to receiving the trigger signal (320), the task dispatcher (131) enters a busy state and sequentially starts task 1 (110), task 2 (111), and task 3 (112). This task activation process is the same as the conventional one.
 図5は、本実施例に係るMPU(100)内にて実行される上記処理の概要を示すシーケンス図である。図5に示すように、まずステップ501においてタイマー(140)が各周期の開始タイミングにおいてトリガ信号を生成し、タイム・キーパー(300)に送信する。ステップ502及び503において、タイム・キーパー(300)は、ディスパッチャ完了信号保持レジスタ(301)及びタイマー要求保持レジスタ(302)の内容をクリアするとともに、タスク・ディスパッチャ(131)に、各タスクの起動タイミングを通知するトリガ信号(320)を送信する。ステップ504においてタスク・ディスパッチャ(131)はタスクを順次起動させ、ステップ505において該周期内において最後に実行されるタスクからの完了信号(122)を受信する。タスク・ディスパッチャ(131)は、該最後の完了信号受信に応じて、ステップ506においてタイム・キーパー(300)にディスパッチャ完了信号(310)を送信する。ステップ507においてタイム・キーパー(300)は、ディスパッチャ完了信号保持レジスタ(301)にディスパッチャ完了信号(310)を保持し、タイマー(140)から次のトリガ信号(141)を受信するまで待機する。 FIG. 5 is a sequence diagram showing an overview of the above processing executed within the MPU (100) according to this embodiment. As shown in FIG. 5, first, in step 501, the timer (140) generates a trigger signal at the start timing of each cycle and transmits it to the time keeper (300). In steps 502 and 503, the time keeper (300) clears the contents of the dispatcher completion signal holding register (301) and the timer request holding register (302), and also informs the task dispatcher (131) of the startup timing of each task. A trigger signal (320) notifying the user is transmitted. In step 504, the task dispatcher (131) sequentially activates tasks, and in step 505, receives a completion signal (122) from the task executed last within the period. The task dispatcher (131) sends a dispatcher completion signal (310) to the time keeper (300) in step 506 in response to receiving the last completion signal. In step 507, the time keeper (300) holds the dispatcher completion signal (310) in the dispatcher completion signal holding register (301) and waits until receiving the next trigger signal (141) from the timer (140).
 続いて、本実施例においてタスク・ディスパッチャ(131)が実行する処理について図6のフローチャートを用いて説明する。図6のフローチャートは、図13に示した従来におけるタスク・ディスパッチャ(131)が実行する処理に加えて、ステップS601が追加されている。また、ステップS1301において受信するトリガ信号は、タイマー(140)からのトリガ信号(141)ではなく、タイム・キーパー(300)からのトリガ信号(320)である。 Next, the process executed by the task dispatcher (131) in this embodiment will be explained using the flowchart of FIG. 6. In the flowchart of FIG. 6, step S601 is added in addition to the process executed by the conventional task dispatcher (131) shown in FIG. Further, the trigger signal received in step S1301 is not the trigger signal (141) from the timer (140) but the trigger signal (320) from the time keeper (300).
 本実施例におけるタスク・ディスパッチャ(131)は、ステップS1304において該周期内に実行されるべき全タスクの処理が完了したと判定すると、ディスパッチャ完了信号(310)を生成し、タイム・キーパー(300)に送信する。タイム・キーパー(300)は、上述の通りこれに応じてディスパッチャ完了信号保持レジスタ(301)にこの信号を保持する。 When the task dispatcher (131) in this embodiment determines in step S1304 that processing of all tasks to be executed within the period has been completed, it generates a dispatcher completion signal (310) and sends the time keeper (300) Send to. The time keeper (300) accordingly holds this signal in the dispatcher completion signal holding register (301) as described above.
 図7に、走行データ受信の遅延が生じた場合に本実施例に係るMPU(100)が実行する処理を表すタイムチャートを示す。図7においては、第(n+1)周期において、走行データ(151)の受信が遅延したと想定する。 FIG. 7 shows a time chart representing the process executed by the MPU (100) according to the present embodiment when a delay in receiving driving data occurs. In FIG. 7, it is assumed that reception of travel data (151) is delayed in the (n+1)th cycle.
 第n周期内における処理については走行データの受信遅延が生じていない図4と同様であり、タスク・ディスパッチャ(131)はタスク1~3を順次起動し、最後のタスク3(112)から完了信号(122c)を受信すると、ディスパッチャ完了信号(310)をタイム・キーパー(300)に送信する。タイム・キーパー(300)は、該受信においディスパッチャ完了信号保持レジスタ(301)に該受信情報を保持する。 The processing within the n-th period is the same as that in FIG. 4 in which there is no delay in receiving driving data, and the task dispatcher (131) sequentially starts tasks 1 to 3, and receives a completion signal from the last task 3 (112). (122c), it sends a dispatcher complete signal (310) to the time keeper (300). The time keeper (300) holds the reception information in the dispatcher completion signal holding register (301) upon reception.
 そして、タイマー(140)は第n周期に続く第(n+1)周期の開始タイミングにおいてトリガ信号(141)を生成し、タイム・キーパー(300)に送信する。すると、タイム・キーパー(300)はタイマー要求保持レジスタ(302)にトリガ信号が来たことを保持する。上述の通りタイム・キーパー(300)のディスパッチャ完了信号保持レジスタ(301)は完了を保持した状態であるため、AND器(303)はトリガ信号(320)をタスク・ディスパッチャ(131)に送信すると同時にディスパッチャ完了信号保持レジスタ(301)とタイマー要求保持レジスタ(302)をクリアする。それを受けてタスク・ディスパッチャ(131)はbusy状態となりタスク1(110)、タスク2(111)、タスク3(112)を順番に起動していく。 Then, the timer (140) generates a trigger signal (141) at the start timing of the (n+1)th period following the nth period, and transmits it to the time keeper (300). Then, the time keeper (300) holds the arrival of the trigger signal in the timer request holding register (302). As mentioned above, the dispatcher completion signal holding register (301) of the time keeper (300) is in a state of holding completion, so the AND unit (303) sends the trigger signal (320) to the task dispatcher (131) and at the same time Clear the dispatcher completion signal holding register (301) and timer request holding register (302). In response, the task dispatcher (131) goes into a busy state and starts task 1 (110), task 2 (111), and task 3 (112) in order.
 タスク・ディスパッチャ(131)はタスク2(111)からの完了信号(122b)を受信後、タスク3(112)を起動するための起動信号(121c)をタスク3(112)に送信し、タスク3(112)を起動しようとする。しかし、上述の通り図7においては第(n+1)周期中において走行データ(151)の受信に遅延(240)が生じている。 After receiving the completion signal (122b) from task 2 (111), the task dispatcher (131) sends a start signal (121c) to start task 3 (112) to task 3 (112), and (112). However, as described above, in FIG. 7, there is a delay (240) in receiving the travel data (151) during the (n+1)th cycle.
 第(n+1)周期内におけるタスク3(112)の実行が完了しない場合であっても、タイマー(140)内のタイムカウンタは作動し続けるため、第(n+1)周期の開始から10ms経過後に、タイマー(140)は第(n+2)周期における処理を開始するためのトリガ信号(141)を生成し、タイム・キーパー(300)に送信する。タイム・キーパー(300)は該信号の受信に応じてタイマー要求保持レジスタ(302)にトリガ信号(141)が来た情報を保持する。しかし、タスク・ディスパッチャ(131)はこの時点ではタスク3(112)から完了信号(122c)を受信していないため、タイム・キーパー(300)にディスパッチャ完了信号(310)を送信していない。従って、タイム・キーパー(300)のディスパッチャ完了信号保持レジスタ(301)にはディスパッチャ完了信号(310)の受信情報が保持されていない。そのため、AND器(303)の信号生成条件が成立せず、タイム・キーパー(300)によるトリガ信号(320)の生成は保留状態となる。 Even if the execution of task 3 (112) in the (n+1)th cycle is not completed, the time counter in the timer (140) continues to operate, so that the timer (140) generates a trigger signal (141) for starting processing in the (n+2)th period, and transmits it to the time keeper (300). The time keeper (300) holds information that the trigger signal (141) has arrived in a timer request holding register (302) in response to receiving the signal. However, since the task dispatcher (131) has not received the completion signal (122c) from task 3 (112) at this point, it has not sent the dispatcher completion signal (310) to the time keeper (300). Therefore, the dispatcher completion signal holding register (301) of the time keeper (300) does not hold reception information of the dispatcher completion signal (310). Therefore, the signal generation conditions of the AND device (303) are not satisfied, and the generation of the trigger signal (320) by the time keeper (300) is put on hold.
 上述の保留状態は第(n+1)周期内にて遅延していたタスク3(112)の実行が完了し、タスク・ディスパッチャ(131)がタイム・キーパー(300)に対してディスパッチャ完了信号(310)を送信するまで継続する。その結果として、第(n+2)周期の始点として想定されていたタイミングから、タイム・キーパー(300)がディスパッチャ完了信号(310)を受信するまでの期間(260)は、第(n+2)周期の開始タイミングを通知するトリガ信号(141)の生成が保留状態になる「抑止期間」となる。 In the above-mentioned pending state, the execution of task 3 (112), which had been delayed within the (n+1)th period, is completed, and the task dispatcher (131) sends the dispatcher completion signal (310) to the time keeper (300). Continue until sent. As a result, the period (260) from the timing assumed as the start point of the (n+2)th period until the time keeper (300) receives the dispatcher completion signal (310) is the start of the (n+2)th period. This becomes a "suppression period" in which the generation of the trigger signal (141) that notifies the timing is put on hold.
 タスク・ディスパッチャ(131)がタスク3(112)からの完了信号(122c)の受信に応じてタイム・キーパー(300)に対してディスパッチャ完了信号(310)を送信すると、タイム・キーパー(300)はディスパッチャ完了信号保持レジスタ(301)に信号を保持する。すると、AND器(303)のON条件が満たされるため、タイム・キーパー(300)第(n+2)周期の開始を通知するトリガ信号(320)をタスク・ディスパッチャ(131)に送信すると同時にディスパッチャ完了信号保持レジスタ(301)とタイマー要求保持レジスタ(302)をクリアする。それを受けてタスク・ディスパッチャ(131)はbusy状態となりタスク1(110)、タスク2(111)、タスク3(112)を順番に起動していく。以下、先述と同様の流れに従ってタスク1(110)、タスク2(111)、タスク3(112)が処理されていく。 When the task dispatcher (131) sends a dispatcher completion signal (310) to the time keeper (300) in response to receiving the completion signal (122c) from task 3 (112), the time keeper (300) The signal is held in the dispatcher completion signal holding register (301). Then, since the ON condition of the AND device (303) is satisfied, the time keeper (300) sends the trigger signal (320) notifying the start of the (n+2)th period to the task dispatcher (131) and at the same time sends the dispatcher completion signal. Clear the holding register (301) and timer request holding register (302). In response, the task dispatcher (131) goes into a busy state and starts task 1 (110), task 2 (111), and task 3 (112) in order. Thereafter, task 1 (110), task 2 (111), and task 3 (112) are processed according to the same flow as described above.
 上記説明した実施例においてタイム・キーパー(300)が実行する処理を図8のフローチャートを用いて説明する。まずステップS801においてタイム・キーパー(300)は、タイマー(140)から、ある周期の開始タイミングを通知するトリガ信号(141)を受信する。ステップS802において、タイム・キーパー(300)はディスパッチャ完了信号保持レジスタ(301)を参照し、ディスパッチャ完了信号(310)の受信を保持しているか否か判定する。保持していなければそのまま待機し、保持していればステップS803へと移行し、トリガ信号(320)を生成し、タスク・ディスパッチャ(131)に対して処理の開始を通知する。 The process executed by the time keeper (300) in the embodiment described above will be explained using the flowchart of FIG. 8. First, in step S801, the time keeper (300) receives a trigger signal (141) from the timer (140) that notifies the start timing of a certain period. In step S802, the time keeper (300) refers to the dispatcher completion signal holding register (301) and determines whether the reception of the dispatcher completion signal (310) is held. If it is not held, it remains on standby; if it is held, the process moves to step S803, generates a trigger signal (320), and notifies the task dispatcher (131) of the start of processing.
 以上説明した様に本実施例によれば、あるタスクの実行が想定されていた実行周期内に完了しなかった場合においても、タイム・キーパー(300)は全てのタスクの実行が完了するまでタスク・ディスパッチャ(131)に処理開始を通知するトリガ信号(320)の生成を保留とすることで、タイマー(140)から次の周期の開始を通知するトリガ信号(141)を受信した場合であってもタスク・ディスパッチャ(131)は正常に動作を継続することが可能であり、タスク1(110)、タスク2(111)、タスク3(112)の処理も正しく継続することが可能となる。 As explained above, according to the present embodiment, even if the execution of a certain task is not completed within the expected execution cycle, the time keeper (300) keeps track of the task until the execution of all tasks is completed. - By suspending the generation of the trigger signal (320) that notifies the dispatcher (131) of the start of processing, even if the trigger signal (141) that notifies the start of the next cycle is received from the timer (140); The task dispatcher (131) can continue to operate normally, and the processing of task 1 (110), task 2 (111), and task 3 (112) can also continue correctly.
 次に、本発明の変形例に係るMPU(100)が実行する処理について図9-10を用いて説明する。図9は、変形例に係るMPU(100)が実行する処理を示すタイムチャートであり、図10は、タイム・キーパー(300)が実行する処理を示すフローチャートである。 Next, processing executed by the MPU (100) according to a modification of the present invention will be described using FIGS. 9-10. FIG. 9 is a time chart showing the processing executed by the MPU (100) according to the modification, and FIG. 10 is a flowchart showing the processing executed by the time keeper (300).
 上記で説明した実施例においては、あるタスクの実行が想定されていた周期内に完了しない場合に、次の周期の開始を通知するトリガ信号が生成されることに起因する問題点を解消することを目的としていた。これに対して変形例においては、一周期内において全てのタスク実行が完了するまでの期間が所定の期間よりも短いときに、次の周期の開始を早め、CPUの利用効率を向上させることを目的とするものである。 In the embodiment described above, it is possible to solve the problem caused by the generation of a trigger signal that notifies the start of the next cycle when execution of a certain task is not completed within the expected cycle. was aimed at. On the other hand, in a modified example, when the period until all task execution is completed within one cycle is shorter than a predetermined period, the start of the next cycle is brought forward to improve CPU utilization efficiency. This is the purpose.
 具体的には、図9に示すように例えば第n周期において、タイム・キーパー(300)は、タスク・ディスパッチャ(131)からディスパッチャ完了信号(310)を受信した時点から、タイマー(140)から第(n+1)周期の開始を通知するトリガ信号(141)を受信するまでの時間である周期間期間(270)を計測する。これは例えば、ディスパッチャ完了信号保持レジスタ(301)とタイマー要求保持レジスタ(302)のそれぞれにタイムカウンタを備えさせ、その受信時刻の差分を得ることで計測可能である。 Specifically, as shown in FIG. 9, for example, in the n-th period, the time keeper (300) receives the dispatcher completion signal (310) from the task dispatcher (131), and from the time the time keeper (300) receives the dispatcher completion signal (310) from the timer (140). A cycle period period (270) is measured, which is the time until the trigger signal (141) notifying the start of the (n+1) cycle is received. This can be measured, for example, by providing a time counter in each of the dispatcher completion signal holding register (301) and the timer request holding register (302), and obtaining the difference between the reception times.
 タイム・キーパー(300)は第n周期内においてタスク1-3の実行が完了するまでの期間と所定の期間とを比較し、タスク1-3の実行が完了するまでの期間が該所定の期間よりも短い場合に、タイマー(140)に対して、第(n+2)周期の開始を短縮時間(280)だけ早めるように指示する。これは、周期間期間(270)と、一周期(図9においては10ms)と上記所定の期間との差分を比較することによって判定できる。 The time keeper (300) compares the period until the execution of tasks 1-3 is completed with a predetermined period within the n-th cycle, and determines whether the period until the execution of tasks 1-3 is completed is the predetermined period. , the timer (140) is instructed to advance the start of the (n+2)th cycle by the shortened time (280). This can be determined by comparing the cycle period (270) with the difference between one cycle (10 ms in FIG. 9) and the predetermined period.
 上記において、タスク1-3の実行が完了するまでの期間と比較される所定の期間は、既述の、周期内にタスクの実行が完了しない場合の問題が生じないような範囲で設定され、走行データの受信間隔や各タスクの最悪実行時間等を考慮して予め定めることができる。 In the above, the predetermined period to be compared with the period until the execution of tasks 1-3 is completed is set within a range that does not cause the problem when the execution of the task is not completed within the period described above, It can be predetermined in consideration of the travel data reception interval, the worst execution time of each task, etc.
 図10は、本変形例においてタイム・キーパー(300)が実行する処理を示すフローチャートである。まず、ステップS1001において、タイム・キーパー(300)はタスク・ディスパッチャ(131)からディスパッチャ完了信号(310)を受信する。ステップS1002において、タイム・キーパー(300)から、次の周期の開始を通知するトリガ信号(141)を受信する。そしてタイム・キーパー(300)は上述のように周期間期間(270)を計測し、ステップS1003において、予め設定された所定の期間に対応する閾値と比較し、周期間期間(270)が閾値よりも長ければ、一周期内において全タスクの実行を完了してから次周期が始まるまでの期間に余裕があると判断し、ステップS1004において、タイム・キーパー(300)に対して、次の周期の開始を通知するトリガ信号(141)の生成周期を短縮するよう指示する信号を送信する。 FIG. 10 is a flowchart showing the processing executed by the time keeper (300) in this modification. First, in step S1001, the time keeper (300) receives a dispatcher completion signal (310) from the task dispatcher (131). In step S1002, a trigger signal (141) notifying the start of the next cycle is received from the time keeper (300). The time keeper (300) then measures the cyclic period (270) as described above, and in step S1003 compares it with a threshold value corresponding to a predetermined period set in advance, and determines whether the cyclic period (270) is less than the threshold value. If it is long, it is determined that there is enough time from completion of execution of all tasks within one cycle until the start of the next cycle, and in step S1004, the time keeper (300) is instructed to perform the next cycle. A signal instructing to shorten the generation cycle of the trigger signal (141) notifying the start is transmitted.
 以上説明した変形例によれば、一周期内において全タスクの実行を完了してから次周期の開始までに余裕がある場合に、周期開始のタイミングを早めることで、CPUが稼働しないidle時間を削減することが可能になり、CPUの利用効率を向上させ、タスク実行の高速化が期待できる。 According to the modification described above, if there is a margin between the completion of execution of all tasks within one cycle and the start of the next cycle, by advancing the cycle start timing, the idle time during which the CPU does not operate can be reduced. This makes it possible to reduce the number of CPUs, improve the efficiency of CPU usage, and expect faster task execution.
 以上で説明した本発明の実施例によれば、以下の作用効果を奏する。
(1)本発明に係る情報処理装置は、複数のタスクを実行するタスク実行部と、所定の周期で第一のトリガ信号を生成する周期生成部と、第一のトリガ信号を受信し、タスク実行部に対して複数のタスクの実行開始を指示する第二のトリガ信号を送信するタスク実行管理部と、を有し、タスク実行管理部は、タスク実行部の実行状況に応じて第二のトリガ信号の送信タイミングを調整する。
According to the embodiments of the present invention described above, the following effects are achieved.
(1) The information processing device according to the present invention includes a task execution unit that executes a plurality of tasks, a cycle generation unit that generates a first trigger signal at a predetermined cycle, and a task execution unit that receives the first trigger signal and a task execution management section that transmits a second trigger signal instructing the execution section to start execution of a plurality of tasks; the task execution management section transmits a second trigger signal according to the execution status of the task execution section; Adjust the trigger signal transmission timing.
 上記構成により、一定周期で実行されるタスクが何らかの要因により所定の周期内に処理が完了しない場合であっても、各タスクないしMPU全体として正常な動作を継続することが可能になる。 With the above configuration, even if a task executed at a constant cycle does not complete its processing within a predetermined cycle due to some reason, each task or the MPU as a whole can continue to operate normally.
(2)タスク実行部による、周期内における複数のタスクの実行を完了するまでの期間が所定の期間よりも短い場合に、タスク実行管理部は、周期生成部に対して第一のトリガ信号を生成する周期を短縮化させる指示信号を送信する。これにより、CPUが稼働しないidle時間を削減することが可能になり、CPUの利用効率を向上させ、タスク実行の高速化が期待できる。 (2) If the period until the task execution unit completes execution of multiple tasks within a cycle is shorter than a predetermined period, the task execution management unit sends the first trigger signal to the cycle generation unit. Sends an instruction signal to shorten the generation cycle. This makes it possible to reduce the idle time during which the CPU does not operate, improves the efficiency of CPU usage, and can be expected to speed up task execution.
(3)タスク実行部は、周期内における複数のタスクの全ての実行が完了した場合に、タスク実行管理部に対して実行完了信号を送信し、タスク実行管理部は、第一のトリガ信号を受信した後、実行完了信号の受信を条件として第二のトリガ信号を送信する。これにより、タイム・キーパー(300)は全てのタスクの実行が完了するまでタスク・ディスパッチャ(131)に処理開始を通知するトリガ信号(320)の生成を保留とすることで、タイマー(140)から次の周期の開始を通知するトリガ信号(141)を受信した場合であってもタスク・ディスパッチャ(131)は正常に動作を継続することが可能になる。 (3) The task execution unit transmits an execution completion signal to the task execution management unit when execution of all the multiple tasks within the cycle is completed, and the task execution management unit sends the first trigger signal. After receiving the trigger signal, a second trigger signal is transmitted on condition that the execution completion signal is received. As a result, the time keeper (300) suspends the generation of the trigger signal (320) that notifies the task dispatcher (131) of the start of processing until the execution of all tasks is completed. Even when the task dispatcher (131) receives a trigger signal (141) notifying the start of the next cycle, it is possible to continue operating normally.
 本実施例では地図情報処理ユニット(MPU)での動作を例に説明しているが、これはMPUに限定されるものでは無く、例えば一定間隔で定期的な処理を行うシステム全般への適用が考えられる。また情報処理システムは必ずしも実機である必要は無く、前述の通り例えばIntegrated ECUの上に構築されたMPUや情報処理システム全般への応用が考えられる。 In this embodiment, the operation in a map information processing unit (MPU) is explained as an example, but this is not limited to the MPU, and can be applied to general systems that perform periodic processing at regular intervals, for example. Conceivable. Further, the information processing system does not necessarily have to be an actual machine, and as mentioned above, it can be applied to, for example, an MPU built on an integrated ECU or an information processing system in general.
 なお、本発明は、上記の実施例に限定されるものではなく、様々な変形が可能である。例えば、上記の実施例は、本発明を分かりやすく説明するために詳細に説明したものであり、本発明は、必ずしも説明した全ての構成を備える態様に限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能である。また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、削除したり、他の構成を追加・置換したりすることが可能である。 Note that the present invention is not limited to the above embodiments, and various modifications are possible. For example, the above embodiments have been described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to embodiments having all the configurations described. Furthermore, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment. Further, it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, it is possible to delete a part of the configuration of each embodiment, or add or replace other configurations.
100:MPU(情報処理装置) 131:タスク・ディスパッチャ(タスク実行部) 140:タイマー(周期生成部) 300:タイム・キーパー(タスク実行管理部) 100: MPU (information processing unit) 131: Task dispatcher (task execution unit) 140: Timer (cycle generation unit) 300: Time keeper (task execution management unit)

Claims (3)

  1.  複数のタスクを実行するタスク実行部と、
     所定の周期で第一のトリガ信号を生成する周期生成部と、
     前記第一のトリガ信号を受信し、前記タスク実行部に対して前記複数のタスクの実行開始を指示する第二のトリガ信号を送信するタスク実行管理部と、を有し、
     前記タスク実行管理部は、前記タスク実行部の実行状況に応じて前記第二のトリガ信号の送信タイミングを調整する、
    ことを特徴とする情報処理装置。
    a task execution unit that executes multiple tasks;
    a cycle generation unit that generates a first trigger signal at a predetermined cycle;
    a task execution management unit that receives the first trigger signal and transmits a second trigger signal that instructs the task execution unit to start executing the plurality of tasks;
    The task execution management unit adjusts the transmission timing of the second trigger signal according to the execution status of the task execution unit.
    An information processing device characterized by:
  2.  請求項1に記載の情報処理装置であって、
     前記タスク実行部による、前記周期内における前記複数のタスクの実行を完了するまでの期間が所定の期間よりも短い場合に、
     前記タスク実行管理部は、前記周期生成部に対して前記第一のトリガ信号を生成する周期を短縮化させる指示信号を送信する、
    ことを特徴とする情報処理装置。
    The information processing device according to claim 1,
    If the period until the task execution unit completes execution of the plurality of tasks within the cycle is shorter than a predetermined period,
    The task execution management unit transmits an instruction signal to the cycle generation unit to shorten the cycle of generating the first trigger signal.
    An information processing device characterized by:
  3.  請求項1に記載の情報処理装置であって、
     前記タスク実行部は、前記周期内における前記複数のタスクの全ての実行が完了した場合に、前記タスク実行管理部に対して実行完了信号を送信し、
     前記タスク実行管理部は、前記第一のトリガ信号を受信した後、前記実行完了信号の受信を条件として前記第二のトリガ信号を送信する、
    ことを特徴とする情報処理装置。
    The information processing device according to claim 1,
    The task execution unit transmits an execution completion signal to the task execution management unit when execution of all of the plurality of tasks within the period is completed,
    After receiving the first trigger signal, the task execution management unit transmits the second trigger signal on condition that the execution completion signal is received.
    An information processing device characterized by:
PCT/JP2023/018300 2022-06-27 2023-05-16 Information processing device WO2024004414A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022102943A JP2024003654A (en) 2022-06-27 2022-06-27 Information processing apparatus
JP2022-102943 2022-06-27

Publications (1)

Publication Number Publication Date
WO2024004414A1 true WO2024004414A1 (en) 2024-01-04

Family

ID=89381988

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/018300 WO2024004414A1 (en) 2022-06-27 2023-05-16 Information processing device

Country Status (2)

Country Link
JP (1) JP2024003654A (en)
WO (1) WO2024004414A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07141300A (en) * 1993-11-18 1995-06-02 Nippon Telegr & Teleph Corp <Ntt> Period processing method using plural processors
JPH09202227A (en) * 1996-01-29 1997-08-05 Akebono Brake Ind Co Ltd Anti-lock control method and device thereof
JPH10161890A (en) * 1996-11-27 1998-06-19 Mitsubishi Electric Corp Scheduler
JP2021163425A (en) * 2020-04-03 2021-10-11 株式会社デンソー Electronic control device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07141300A (en) * 1993-11-18 1995-06-02 Nippon Telegr & Teleph Corp <Ntt> Period processing method using plural processors
JPH09202227A (en) * 1996-01-29 1997-08-05 Akebono Brake Ind Co Ltd Anti-lock control method and device thereof
JPH10161890A (en) * 1996-11-27 1998-06-19 Mitsubishi Electric Corp Scheduler
JP2021163425A (en) * 2020-04-03 2021-10-11 株式会社デンソー Electronic control device

Also Published As

Publication number Publication date
JP2024003654A (en) 2024-01-15

Similar Documents

Publication Publication Date Title
US8856196B2 (en) System and method for transferring tasks in a multi-core processor based on trial execution and core node
EP2583437B1 (en) Distributed avionics system and method
US8281304B2 (en) High availability system and execution state control method
EP1789874A2 (en) Method and system for concurrent excution of mutiple kernels
CN108701055B (en) Vehicle control device and vehicle system
US20110022809A1 (en) Consolidated electronic control unit and relay program implemented in the same
JP2004362100A (en) Information processor, method for controlling process, and computer program
Henzinger et al. Composable code generation for distributed Giotto
WO2019072624A1 (en) Control unit, method for operating a control unit, method for configuring a virtualization system of a control unit
US8225320B2 (en) Processing data using continuous processing task and binary routine
JP2002132741A (en) Processor adding method, computer and recording medium
WO2024004414A1 (en) Information processing device
JP2012239143A (en) Electronic control unit, on-vehicle network and data transmission method
US8423681B2 (en) Control apparatus for process input-output device
Ashjaei et al. End-to-end resource reservations in distributed embedded systems
Klobedanz et al. Distributed coordination of task migration for fault-tolerant FlexRay networks
JPWO2018211865A1 (en) Vehicle control device
Klobedanz et al. Task migration for fault-tolerant flexray networks
US11055163B2 (en) Method and device for error handling in a communication between distributed software components
JP3576437B2 (en) Multiprocessor task control method and task control device
CN115297180B (en) Cluster scheduling method, device and storage medium
EP4296856A1 (en) Computer system and method for executing an automotive customer function
Mitzlaff et al. Enabling mode changes in a distributed automotive system
Domaratsky et al. Back-end software for highly dependable real-time control systems
JP2010205085A (en) Processor and processor processing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23830866

Country of ref document: EP

Kind code of ref document: A1