JP2018049405A - Vehicle controller and vehicle control system - Google Patents

Vehicle controller and vehicle control system Download PDF

Info

Publication number
JP2018049405A
JP2018049405A JP2016183623A JP2016183623A JP2018049405A JP 2018049405 A JP2018049405 A JP 2018049405A JP 2016183623 A JP2016183623 A JP 2016183623A JP 2016183623 A JP2016183623 A JP 2016183623A JP 2018049405 A JP2018049405 A JP 2018049405A
Authority
JP
Japan
Prior art keywords
task
vehicle control
time
control device
execution
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2016183623A
Other languages
Japanese (ja)
Other versions
JP6803709B2 (en
Inventor
敏史 大塚
Toshifumi Otsuka
敏史 大塚
祐 石郷岡
Hiroshi Ishigooka
祐 石郷岡
櫻井 康平
Kohei Sakurai
康平 櫻井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2016183623A priority Critical patent/JP6803709B2/en
Priority to PCT/JP2017/027369 priority patent/WO2018055907A1/en
Publication of JP2018049405A publication Critical patent/JP2018049405A/en
Application granted granted Critical
Publication of JP6803709B2 publication Critical patent/JP6803709B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • B60R16/023Electric 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 for transmission of signals between vehicle parts or subsystems
    • 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

Abstract

PROBLEM TO BE SOLVED: To provide a vehicle controller capable of facilitating integration of tasks in a time division control scheduling.SOLUTION: The vehicle controller for controlling activation of tasks based on the time confirms a running task in operation at start time of each task and determines whether the running task is continuable. When determining that the running task is continuable, the vehicle controller controls to temporarily stop the running task, and when determining that the running task is not continuable, to terminate the running task.SELECTED DRAWING: Figure 1

Description

本発明は、車両制御装置および車両制御システムに関する。   The present invention relates to a vehicle control device and a vehicle control system.

本技術分野の背景技術として、特開2016−013782号公報(特許文献1)がある。この公報には、「定時タスクの実行を適切に管理する車載電子制御装置を提供する。」ことを課題とし、解決手段として、「車載電子制御装置は、所定時間間隔で起動される定時タスクの処理A、B、Cのうち必須の処理Aを実行してから(S400)、定時タスクが次回起動されるまでの現在時刻からの残り時間Xを算出し(S404)、定時タスクよりも優先度が上位の上位タスクが残り時間Xの間で実行される実行時間Zを残り時間Xの長さに応じて算出する(S408、S410、S412)。車載電子制御装置は、残り時間Xと実行時間Zとの差(X−Z)を定時タスクの実行可能時間として算出し、実行可能時間に基づいて処理B、Cのうち処理Bを実行するか否かを判定する(S414)。車載電子制御装置は、S414の判定結果に基づいて処理Bの実行を管理する(S416、S418)。」と記載されている。   As background art in this technical field, there is JP-A-2006-013782 (Patent Document 1). This gazette has an object of “providing an in-vehicle electronic control device that appropriately manages execution of a scheduled task.” As a means for solving the problem, “the in-vehicle electronic control device is a scheduled task activated at a predetermined time interval. After executing the essential process A among the processes A, B, and C (S400), the remaining time X from the current time until the scheduled task is started next time is calculated (S404), and the priority is higher than the scheduled task. Is calculated according to the length of the remaining time X (S408, S410, S412) The in-vehicle electronic control unit calculates the remaining time X and the execution time. The difference (X−Z) from Z is calculated as the execution time of the scheduled task, and it is determined based on the execution time whether or not the process B out of the processes B and C is executed (S414). The device is S414. Results for managing the execution of processing B on the basis of (S416, S418). Has been described as ".

また別の背景技術として、特開2005−071141号公報(特許文献2)がある。この公報には、「タスク構成が大きく変わらない限りタスク数が増加してもスタックの総容量を増加する必要がないと共に、高いスタック利用効率が得られるスタック管理方法を提供する。」ことを課題とし、解決手段として、「中断中の全タスクが共用可能なタスクスタックを設け、そのタスクスタックの記憶領域を所定のブロック長を持つ複数のブロックから構成して、前記データを前記ブロックに分けて記憶するようにする。あるタスクの実行を中断するために前記共有スタック内のデータを前記タスクスタックに退避する際には、前記共有スタック内のデータ量に応じて未使用の前記ブロックに記憶させ、当該ブロックの識別データと当該タスク用の識別データを記憶する。前記ブロック識別データと前記タスク識別データを用いて前記データを前記共有スタックに復帰する。」と記載されている。   As another background art, there is JP-A-2005-071141 (Patent Document 2). In this publication, there is a need to “provide a stack management method that does not require an increase in the total capacity of the stack even if the number of tasks increases as long as the task configuration does not change significantly, and provides high stack utilization efficiency”. As a solution, “a task stack that can be shared by all suspended tasks is provided, the storage area of the task stack is composed of a plurality of blocks having a predetermined block length, and the data is divided into the blocks. When the data in the shared stack is saved to the task stack in order to interrupt execution of a task, the data is stored in the unused block according to the amount of data in the shared stack. The block identification data and the task identification data are stored using the block identification data and the task identification data. Returning the serial data in the shared stack. It has been described as ".

特開2016−013782号公報JP 2006-013782 A 特開2005−071141号公報JP 2005-071141 A

上記背景技術ではタスクを優先度制御、時間駆動型スケジューリングにより動作させる場合に、タスクの有する条件に基づき効率的にシステムを動作させる方法について記載されている。   The above background art describes a method of operating a system efficiently based on the conditions of a task when the task is operated by priority control and time-driven scheduling.

しかし、制御システムを高信頼化させるために用いられる時間駆動型スケジューリングなど、ある定められた時間内に動作させるタスクを固定するスケジューリング方式において、システム設計時のタスク統合を容易化させる方法については述べられていない。   However, a method for facilitating task integration at the time of system design in a scheduling method that fixes tasks to be operated within a predetermined time, such as time-driven scheduling used to make control systems highly reliable, is described. It is not done.

特に制御周期が短いタスク(例:1ms周期)と、実行時間の長いタスク(例:5ms)を統合する場合には、実行時間の長いタスクを分割する必要があり、設計が困難である。   In particular, when integrating a task with a short control cycle (eg, 1 ms cycle) and a task with a long execution time (eg, 5 ms), it is necessary to divide the task with a long execution time, which is difficult to design.

本発明は上記課題を鑑みて為されたものであり、タスクの統合を容易化させる車両制御装置および車両制御システムを提供する。   The present invention has been made in view of the above problems, and provides a vehicle control device and a vehicle control system that facilitate task integration.

上記課題を解決するために、本発明の一実施の態様は、例えば特許請求の範囲に記載されている技術的思想を用いればよい。例えば、時間によりタスクを起動する制御を行う車両制御装置において、各タスクの起動時間に実行状態である実行中タスクを確認して、該実行中タスクが継続実行可能であるか否かを判定し、前記実行中タスクが継続実行可能と判定される場合には、前記実行中タスクの一時停止を行い、前記実行中タスクが継続実行可能でないと判定される場合には、前記実行中タスクの終了を行う。   In order to solve the above-described problems, an embodiment of the present invention may use, for example, the technical idea described in the claims. For example, in a vehicle control apparatus that performs control to start a task according to time, it checks the running task that is in the running state at the start time of each task, and determines whether the running task can be continuously executed. When it is determined that the running task can be continuously executed, the running task is paused. When it is determined that the running task cannot be continuously executed, the running task is terminated. I do.

本発明によれば、時間駆動スケジューリングを実現する際に、タスクの統合を容易化させることが可能となる。   According to the present invention, task integration can be facilitated when time-driven scheduling is realized.

本発明の第1の実施例にかかるスケジューリング実行時の判定フローである。It is the determination flow at the time of the scheduling execution concerning the 1st example of the present invention. システムの例である。It is an example of a system. 車両制御システム構成の例である。It is an example of a vehicle control system configuration. コントローラの構成例である。It is a structural example of a controller. コントローラのソフトウェアモジュール構成の例である。It is an example of the software module structure of a controller. タスクの状態遷移例である。It is an example of a task state transition. 時分割制御のスロットとタスク実行の例である。It is an example of a slot of time division control and task execution. スケジュールテーブルの例である。It is an example of a schedule table. 動作ログの例である。It is an example of an action log. 本発明の第2の実施例にかかるタスク管理部のデータコピーの例である。It is an example of the data copy of the task management part concerning 2nd Example of this invention. 本発明の第3の実施例にかかる設計情報の例である。It is an example of the design information concerning the 3rd example of the present invention. 本発明の第4の実施例にかかるスケジューリング実行時の判定フローである。It is the determination flow at the time of the scheduling execution concerning the 4th Example of this invention. タスクの設計情報および動作情報の例である。It is an example of task design information and operation information. タスクの実行結果の例である。It is an example of the execution result of a task.

以下、本発明に好適な実施形態の例(実施例)を説明する。本実施例は、主には車両システムにおける車両制御システム、および車両制御装置について説明しており、車両システムにおける実施に好適であるが、車両システム以外への適用を妨げるものではない。   Hereinafter, examples (examples) of the preferred embodiments of the present invention will be described. The present embodiment mainly describes a vehicle control system and a vehicle control device in a vehicle system, which is suitable for implementation in a vehicle system, but does not hinder application to other than the vehicle system.

<車両制御システムの構成>
図2は本実施例の車両制御システムおよび車両制御装置を有する車両システムの概要である。1は自動車など内部に車両制御システムを有する車両システム、2は例えば車載ネットワーク(CAN:Controller Area Network、CANFD:CAN with Flexible Data−rate、Ethernet(登録商標)、等)とコントローラ(ECU:Electronic Control Unit等)により構成される車両制御システム、3は、車両システム1の外部と無線通信(例えば携帯電話の通信、無線LAN、WAN、C2X(Car to X:車両対車両または車両対インフラ通信)等のプロトコルを使用した通信、またはGPS:Global Positioning Systemを用いた通信)を行い、外界(インフラ、他車、地図)の情報または自車に関する情報を取得・送信などの無線通信を実施、または診断端子(OBD)やEthernet端子、外部記録媒体(例えばUSBメモリ、SDカード、等)端子などを有し、車両制御システム2と通信を実施する通信装置、4は、例えば2と異なる、または同一のプロトコルを用いたネットワークにより構成される車両制御システム、5は、車両制御システム2の制御に従い、車両運動を制御する機械および電気装置(例えばエンジン、トランスミッション、ホイール、ブレーキ、操舵装置等)の駆動を行うアクチュエータ等の駆動装置、6は、外界から入力される情報を取得し、後述する外界認識情報を生成するための情報を出力する、カメラ、レーダ、LIDAR、超音波センサなどの外界センサ、および、車両システム1の状態(運動状態、位置情報、加速度、車輪速度等)を認識する力学系センサにより構成される認識装置、7は、ネットワークシステムに有線または無線で接続され、ネットワークシステムから送出されるデータを受信し、メッセージ情報(例えば映像、音)など必要な情報を表示または出力する、液晶ディスプレイ、警告灯、スピーカなどの出力装置、8は、ユーザが車両制御システム2に対して、操作の意図や指示を入力する入力信号を生成するための、例えばステアリング、ペダル、ボタン、レバー、タッチパネル、等の入力装置、9は、車両システム1が外界に対して、車両の状態等を通知するための、ランプ、LED、スピーカ等の通知装置、を示している。
<Configuration of vehicle control system>
FIG. 2 is an outline of a vehicle system having a vehicle control system and a vehicle control apparatus according to this embodiment. 1 is a vehicle system having a vehicle control system inside, such as an automobile, and 2 is an in-vehicle network (CAN: Controller Area Network, CANFD: CAN with Flexible Data-rate, Ethernet (registered trademark), etc.) and a controller (ECU: Electronic Control). A vehicle control system 3 configured by a unit, etc., and wireless communication with the outside of the vehicle system 1 (for example, mobile phone communication, wireless LAN, WAN, C2X (Car to X: vehicle-to-vehicle or vehicle-to-infrastructure communication)), etc. Communication using the above protocol or communication using GPS (Global Positioning System), and information on the external world (infrastructure, other vehicles, maps) or information on the vehicle must be acquired and transmitted. A communication device 4 having a diagnostic terminal (OBD), an Ethernet terminal, an external recording medium (for example, a USB memory, an SD card, etc.) terminal, etc., and performing communication with the vehicle control system 2, For example, a vehicle control system 5 constituted by a network using a protocol different from or the same as that of 2 is a mechanical and electrical device (for example, an engine, a transmission, a wheel, a brake, etc.) that controls the vehicle motion according to the control of the vehicle control system 2. 6, a driving device such as an actuator for driving the steering device, etc., acquires information input from the outside world, and outputs information for generating outside world recognition information, which will be described later, a camera, radar, LIDAR, super An external sensor such as a sound wave sensor, and the state of the vehicle system 1 (movement state, position information, acceleration, A recognition device configured by a dynamic sensor that recognizes wheel speed, etc., is connected to the network system by wire or wireless, receives data transmitted from the network system, and receives message information (for example, video, sound), etc. An output device 8 for displaying or outputting necessary information, such as a liquid crystal display, a warning light, a speaker, etc., is used for generating an input signal for a user to input an operation intention or instruction to the vehicle control system 2. For example, an input device 9 such as a steering wheel, a pedal, a button, a lever, a touch panel, etc., 9 indicates a notification device such as a lamp, LED, speaker, etc., for the vehicle system 1 to notify the outside of the vehicle state and the like. ing.

車両制御システム2は、その他の車両制御システム4、無線通信部3、駆動装置5、認識装置6、出力装置7、入力装置8、通知装置9などと接続され、それぞれ情報の送受信を行う。   The vehicle control system 2 is connected to the other vehicle control system 4, the wireless communication unit 3, the drive device 5, the recognition device 6, the output device 7, the input device 8, the notification device 9, and the like, and transmits and receives information.

図3は、車両制御システム2のH/W(Hardware)構成例を示している。301は車載ネットワーク上のネットワーク装置を接続するネットワークリンクであり、例えばCANバスなどのネットワークリンク、302はネットワークリンク301および駆動装置5や認識装置6や301以外のネットワークリンク(専用線含む)に接続され、駆動装置5や認識装置6の制御および情報取得、ネットワークとのデータ送受信を行うECU(Electronic Control Unit:電子制御ユニット)、303は複数のネットワークリンク301を接続し、それぞれのネットワークリンクとデータの送受信を行うゲートウェイ(以下GW)、を示している。   FIG. 3 shows an example of the H / W (Hardware) configuration of the vehicle control system 2. Reference numeral 301 denotes a network link for connecting network devices on the in-vehicle network, for example, a network link such as a CAN bus, and 302 denotes a network link 301 and a network link other than the driving device 5 and the recognition device 6 and 301 (including dedicated lines). ECU (Electronic Control Unit) 303 that controls the drive device 5 and the recognition device 6, acquires information, and transmits / receives data to / from the network, 303 connects a plurality of network links 301, and each network link and data 1 shows a gateway (hereinafter referred to as GW) that performs transmission / reception.

ネットワークトポロジの例は、図3に示す2つのバスに複数のECUが接続されているバス型の例以外にも、複数のECUが直接GWに接続されるスター型や、ECUが一連のリンクにリング状に接続されているリンク型、それぞれの型が混在し複数のネットワークにより構成される混在型、等がある。GW303とECU302については、それぞれGW機能を有するECU、またはECUの機能を有するGWと、がある。   In addition to the bus type example in which a plurality of ECUs are connected to the two buses shown in FIG. 3, examples of the network topology include a star type in which a plurality of ECUs are directly connected to the GW, and an ECU in a series of links. There are a link type connected in a ring shape, a mixed type in which each type is mixed and configured by a plurality of networks, and the like. The GW 303 and the ECU 302 include an ECU having a GW function or a GW having an ECU function.

ECU302はネットワークから受信したデータをもとに、駆動装置5への制御信号の出力、認識装置6からの情報の取得、ネットワークへの制御信号および情報の出力、内部状態の変更、などの制御処理を行う。
図4は、本発明にかかるネットワーク装置であるECU302またはGW303の内部構成の一例である。401はキャッシュやレジスタなどの記憶素子を持ち、制御を実行するCPU、GPU、FPGAなどのプロセッサ、402はネットワークリンク301またはネットワークや専用線で接続された駆動装置5または/および認識装置6に対してデータの送受信を行うI/O(Input/Output)、403は図示しないクロックなどを使用し、時間および時刻の管理を行うタイマ、404はプログラムおよび不揮発性のデータを保存するROM(Read Only Memory)、405はプログラムおよび揮発性のデータを保存するRAM(Random Access Memory)、406はECU内部での通信に用いられる内部バス、を示している。
Based on the data received from the network, the ECU 302 outputs control signals to the drive device 5, acquires information from the recognition device 6, outputs control signals and information to the network, changes the internal state, etc. I do.
FIG. 4 is an example of an internal configuration of the ECU 302 or the GW 303 which is a network device according to the present invention. Reference numeral 401 denotes a storage element such as a cache and a register, and a processor such as a CPU, GPU, or FPGA that executes control. Reference numeral 402 denotes a network link 301 or a driving device 5 and / or a recognition device 6 connected by a network or a dedicated line. I / O (Input / Output) for transmitting and receiving data, 403 using a clock (not shown), a timer for managing time and time, and 404 for reading only memory (ROM) for storing programs and nonvolatile data ), 405 indicates a RAM (Random Access Memory) for storing programs and volatile data, and 406 indicates an internal bus used for communication within the ECU.

プロセッサはマルチコアと呼ばれる内部に1つ以上の複数の演算装置を持つものを含む。またタイマについては図に示す通りネットワーク経由でアクセスするものと、プロセッサ自身が有する場合の両方がある。   The processor includes a processor having one or more arithmetic devices inside called a multi-core. As shown in the figure, there are both timers that are accessed via a network and those that the processor itself has.

次にプロセッサ401で動作するソフトウェアモジュールの構成について図5に示す。501はソフトウェアモジュール全体の制御、特に後述するタスクを管理するタスク管理部、502は、通信I/F402の動作および状態を管理し、内部バス406を介し通信I/F402に指示を行う通信管理部、503は、タイマ403を管理し、時間に関する情報取得や制御を行う時間管理部、504は後述する動作ログを管理する動作ログ管理部、505は車両制御システム2を動作させるための演算や制御等を実行するためのタスク、506は車両制御に必要な情報を保持するデータテーブル、507は後述するスケジュールテーブル、508は後述する動作ログ、を表している。   Next, the configuration of a software module that operates on the processor 401 is shown in FIG. A task management unit 501 controls the entire software module, particularly a task management unit that manages tasks to be described later. A communication management unit 502 manages the operation and state of the communication I / F 402 and instructs the communication I / F 402 via the internal bus 406. 503, a time management unit that manages the timer 403 to acquire and control information relating to time, 504, an operation log management unit that manages an operation log, which will be described later, and 505, calculation and control for operating the vehicle control system 2. 506 represents a data table holding information necessary for vehicle control, 507 represents a schedule table described later, and 508 represents an operation log described later.

これら図5の構成についてはプロセッサ401上の動作概念を示したものであり、動作時に必要な情報はROM404およびRAM405から適宜取得、またはROM404およびRAM405に適宜書き込み、を行い動作する。   5 shows the concept of operation on the processor 401, and information necessary at the time of operation is appropriately acquired from the ROM 404 and RAM 405, or written to the ROM 404 and RAM 405 as appropriate.

<タスク>
タスク505は、スレッド、アプリケーション、プロセス、ソフトウェアコンポーネント(SWC)とも呼ばれるソフトウェアモジュールの動作単位の一つであり、前述した通信管理部502および時間管理部503、動作ログ管理部504等もタスクである場合もある。
<Task>
The task 505 is one of the operation units of a software module also called a thread, an application, a process, or a software component (SWC), and the communication management unit 502, the time management unit 503, the operation log management unit 504, and the like described above are also tasks. In some cases.

タスクは後述する状態遷移により実行状態となった場合にプロセッサ401により実行され、各タスクに割り当てられた制御(プログラムの実行)を行う。例えば通信管理部503またはI/O402を介してネットワークおよび駆動装置または認識装置からデータを入手、データテーブル506のデータに対して必要な処理の実行、通信管理部503またはI/O402を介してネットワークまたはI/Oにデータを出力する、等の処理を行い、車両制御システムを動作させる。   The task is executed by the processor 401 when it becomes an execution state due to a state transition described later, and performs control (execution of a program) assigned to each task. For example, data is obtained from the network and the driving device or the recognition device via the communication management unit 503 or the I / O 402, necessary processing is performed on the data of the data table 506, and the network is obtained via the communication management unit 503 or the I / O 402. Alternatively, the vehicle control system is operated by performing processing such as outputting data to the I / O.

タスク間でデータを共有する場合には、データテーブル506の特定の領域に書き込み側タスクが書き込みを行い、また読み込み側タスクが前記特定の領域からデータを読み出すことによりデータの共有を行う。このデータに対するアクセスを行う場合に、後述する排他制御を実施する。   When data is shared between tasks, the writing task writes in a specific area of the data table 506, and the reading task reads data from the specific area to share the data. When accessing this data, exclusive control described later is performed.

<排他制御>
タスク間でのデータの共有や動作の調停を行うため、各タスクは共有リソース(例えばプロセッサ401やメモリ領域(RAM405、データテーブル506、等)、I/O402に対する排他制御を実施する。排他制御には、はセマフォ、ミューテックス、フラグ等を使用し、例えばあるタスクがセマフォを保有(減算)することにより、他のタスクは同じセマフォを保有できなくなる等の管理を行う。これにより、共有リソースへの排他制御を実現する。
<Exclusive control>
In order to perform data sharing and operation arbitration between tasks, each task performs exclusive control on shared resources (for example, the processor 401, the memory area (RAM 405, the data table 506, etc.), and the I / O 402. Uses semaphores, mutexes, flags, etc. For example, when one task owns (subtracts) a semaphore, other tasks can no longer have the same semaphore, etc. Implement exclusive control.

<タスクの状態遷移>
図6にタスクの状態遷移の例について示す。タスク管理部501は前記タスク505に対して、このような状態遷移に基づき管理を行う。
<Task state transition>
FIG. 6 shows an example of task state transition. The task management unit 501 manages the task 505 based on such state transition.

まずタスク管理部501が新規に生成したタスクは、最初に休止状態に移行され、その後タスク管理部501が前記タスクを起動し、実行可能状態に遷移させる。   First, a task newly generated by the task management unit 501 is first shifted to a dormant state, and then the task management unit 501 starts the task and makes a transition to an executable state.

実行可能状態においては、例えば時間駆動スケジューリングにおいて、該当タスク(例えばタスクT1)が実行可能な時間(スロット)になった場合には、タスク管理部501はタスクT1が実行権を獲得したとし、実行状態に遷移させる。実行状態になったタスクについてはプロセッサ401にて前記タスクの処理を実行する。   In the executable state, for example, in time-driven scheduling, when the time (slot) in which the task (for example, task T1) can be executed is reached, the task management unit 501 determines that the task T1 has acquired the execution right, Transition to a state. For the task in the execution state, the processor 401 executes processing of the task.

その後、前記タスクが実行可能な時間が終了した場合、もしくは前記タスクの処理が終了し前記タスクが実行権を放棄する命令を発行した場合には、タスク管理部501はタスクT1を実行可能状態へと遷移させる。その際にタスク管理部501は次に実行すべきタスクが存在する場合には、次に実行すべきタスクを実行可能状態から実行状態へと遷移させる。   Thereafter, when the time during which the task can be executed ends, or when the processing of the task ends and the task issues an instruction to abandon the execution right, the task management unit 501 enters the task T1 into an executable state. And transition. At that time, if there is a task to be executed next, the task management unit 501 transitions the task to be executed next from the executable state to the execution state.

一方、実行状態にあるタスクが例えばリソースの要求を行い、排他制御によりリソースが取得できなかった場合には、タスク管理部501は前記タスクを待機状態へと遷移させる。待機状態に遷移したタスクはリソースが取得できるまでは待機状態となる。その後、別のタスクがリソースを解放するなどにより、前記待機状態のタスクがリソースを取得可能な状態になった場合には、タスク管理部501は前記リソースを要求して待機状態となっていたタスクを実行可能状態に遷移させる。   On the other hand, when a task in the execution state requests a resource, for example, and the resource cannot be acquired by exclusive control, the task management unit 501 transitions the task to a standby state. A task that has transitioned to a standby state is in a standby state until resources can be acquired. After that, when another task releases the resource, for example, when the task in the standby state becomes in a state where the resource can be acquired, the task management unit 501 requests the resource and enters the task in the standby state. Is transitioned to an executable state.

実行可能状態、実行状態、または待機状態であるタスクが、例えばタスク管理部501や他のタスク等から強制終了の命令を受けた場合には、前記命令を受けたタスクは休止状態となり、再びタスク管理部501から起動の命令を受けるまでは休止状態となる。タスク管理部501から起動の命令を受けた休止状態のタスクは、実行可能状態へと遷移する。   When a task that is in an executable state, an execution state, or a standby state receives a forcible termination instruction from, for example, the task management unit 501 or another task, the task that has received the instruction enters a dormant state, and the task again It will be in a dormant state until it receives a start command from the management unit 501. A task in a dormant state that has received a start command from the task management unit 501 transitions to an executable state.

このようにタスクについてはタスク管理部501からの命令を受け、または自ら実行権の放棄、リソースの要求等を行うことによりこれらの状態遷移を行う。   As described above, the task performs these state transitions by receiving an instruction from the task management unit 501 or by abandoning the execution right or requesting resources.

ここでマルチコアなどの環境においては、前記実行状態のタスクが複数存在する場合もあるが、状態遷移としては同様に実施される。   Here, in an environment such as a multi-core, there may be a plurality of tasks in the execution state, but the state transition is similarly performed.

待機状態においては、タスクの管理情報(スタック、ヒープ、前記タスクが管理するデータテーブルの領域、保有しているリソース)等は次の実行可能状態まで引き継がれ、休止状態では上記管理情報の一部および全てが初期化される。そのため待機状態から実行可能状態および実行状態になるまでの時間は短いが、休止状態から実行状態になるまでには時間がかかり、また休止状態となる前の管理情報を引き継げないため、タスクの処理が不連続となる場合がある。   In the standby state, task management information (stack, heap, data table area managed by the task, owned resources), etc. are inherited to the next executable state, and in the rest state, part of the management information. And everything is initialized. For this reason, the time from the standby state to the executable state and the execution state is short, but it takes time from the hibernation state to the execution state, and the management information before the hibernation state cannot be taken over. May become discontinuous.

また一方で、休止状態になり管理情報を初期化することにより、無限に同じ処理を繰り返す様な不正な状態から、初期状態などの不正で無い状態に戻すことも可能となる。   On the other hand, by initializing the management information in the hibernation state, it is possible to return from an unauthorized state in which the same processing is repeated infinitely to a non-invalid state such as an initial state.

<時分割制御>
タスクの実行について、時分割で制御した場合の例について図7に示す。図7(a)は横軸が時間を示しており、それぞれの時間がスロット(ウィンドウ)として区切られ、それぞれのスロットにID(ここではS1からS11)が割り振られている。ここで各スロットでは割り当てられたタスクのみが動作可能とすることで、時分割でのタスクの実行が可能となる。ある時刻で実行するタスクを選択する動作をスケジューリングと呼ぶ。
<Time division control>
FIG. 7 shows an example in which task execution is controlled in a time-sharing manner. In FIG. 7A, the horizontal axis indicates time, each time is divided into slots (windows), and IDs (here, S1 to S11) are assigned to the respective slots. Here, by allowing only the assigned task to operate in each slot, it is possible to execute the task in a time division manner. The operation of selecting a task to be executed at a certain time is called scheduling.

スケジューリングに用いるスケジュールテーブル507の構成について図8に示す。スケジュールテーブル507はスロットID、スロットの開始時刻、スロットの終了時刻、スロットに割り当てられたタスクのID、後述する跨り判定に使用する時間エラー判定フラグ、により構成されている。このようにして各スロットの時間と、その時間内で動作可能なタスクが予め割り振られている。   The configuration of the schedule table 507 used for scheduling is shown in FIG. The schedule table 507 includes a slot ID, a slot start time, a slot end time, a task ID assigned to the slot, and a time error determination flag used for straddle determination described later. In this way, the time of each slot and the tasks that can operate within that time are allocated in advance.

タスクの動作例について図7(b)に示す。ここでタスク管理部501は時刻0.0において例えば前記タイマ403を用いたアラームにより動作開始する様に設定しておき、そのタイミングでスケジューリングを実施する。前記アラームにより動作開始したタスク管理部501は、現在時刻が0.0であると確認し、スロットIDがS1であることから、タスクIDがT1のタスクの状態を確認し、実行状態にするように処理を行う。その後タスク管理部501は次のスロット開始時刻(この例では時刻0.2)にアラームを設定して動作を終了する。その後タスクT1は処理を行い、処理が終了した場合には自らリソース要求等により待機状態に移行する。このようにして決められた時刻でのスケジューリングによるタスク実行処理を行う。   An example of task operation is shown in FIG. Here, the task management unit 501 is set so that the operation is started by an alarm using, for example, the timer 403 at time 0.0, and scheduling is performed at that timing. The task management unit 501 that has started operation due to the alarm confirms that the current time is 0.0, and since the slot ID is S1, confirms the state of the task with the task ID T1 and sets it to the execution state. To process. Thereafter, the task management unit 501 sets an alarm at the next slot start time (in this example, time 0.2) and ends the operation. Thereafter, the task T1 performs processing. When the processing is completed, the task T1 shifts to a standby state by a resource request or the like. Task execution processing is performed by scheduling at the time determined in this way.

スケジュールテーブル507にはここでは開始時刻と終了時刻の両方を記載しているが、開始時刻のみでも良い。その場合には各スロットの終了時刻は次のスロットの開始時刻にて表現される。そのようにすることにより、スケジュールテーブル507のデータ量を削減可能である。   In the schedule table 507, both the start time and the end time are described here, but only the start time may be used. In that case, the end time of each slot is expressed by the start time of the next slot. By doing so, the data amount of the schedule table 507 can be reduced.

スロットにタスクが割り当てられていない場合には、専用のタスクIDにて現在のスロットにはタスクが割り当てられていないことを記載する。(図8のタスクID:NA)   If no task is assigned to the slot, the dedicated task ID describes that no task is assigned to the current slot. (Task ID: NA in FIG. 8)

<跨り判定>
次に跨り判定の処理について図1を用いて説明する。跨りとは、スロットの終端でタスクの処理が終了しない場合に強制終了するだけでなく、スロット内で処理が終了しないことが許可されるタスクを予め想定し、次の実行可能なスロットまでタスクの処理を一時停止させることである。
<Stride determination>
Next, the stride determination process will be described with reference to FIG. The straddle is not only forcibly terminated when task processing does not end at the end of the slot, but also preliminarily assumes a task that is allowed not to end processing within the slot, and the task is executed up to the next executable slot. It is to pause the process.

タスク管理部501が前記時分割制御に記載のスロット開始時刻のアラームにて動作開始した場合に、タスク管理部501は前のスロットのタスクが実行状態か否かの判定を行う(S101)。判定は、現在実行中のタスクのID、または前のスロットのタスクが待機状態に移行する際のリソースを要求しているか否か、等により行う。前のスロットのタスクが実行状態で無い場合には(S101のno)、次のタスクの実行時刻をスケジュールテーブル507から取得してアラームを設定し(S102)、現在のスロットのタスクをスケジュールテーブル507から取得して実行状態にする処理を行う(S103)。   When the task management unit 501 starts operation by an alarm at the slot start time described in the time division control, the task management unit 501 determines whether or not the task of the previous slot is in an execution state (S101). The determination is made based on the ID of the task currently being executed, whether or not the task in the previous slot is requesting a resource for transitioning to the standby state, and the like. If the task in the previous slot is not in the execution state (no in S101), the execution time of the next task is acquired from the schedule table 507 and an alarm is set (S102), and the task in the current slot is set in the schedule table 507. To obtain an execution state from the above (S103).

前のスロットのタスクが実行状態である場合には(S101のyes)、前のスロットの時間エラー判定フラグの内容を判定する。前記時間エラー判定フラグが“する”の場合(S104のyes)、前のスロットのタスクを強制終了させる。その際には後述する方法でエラー情報を含む動作ログを作成し(S105)、現在実行状態のタスクを強制終了させて休止状態にする(S106)その後は通常時同様、次のタスクの実行時刻をスケジュールテーブルから判定してアラームを設定し(S102)、現在のスロットのタスクをスケジュールテーブルから判定して実行状態にする処理を行う(S103)。   If the task in the previous slot is in the execution state (Yes in S101), the content of the time error determination flag in the previous slot is determined. When the time error determination flag is “Yes” (Yes in S104), the task in the previous slot is forcibly terminated. At that time, an operation log including error information is created by a method described later (S105), and the currently executing task is forcibly terminated and put into a dormant state (S106). Is determined from the schedule table and an alarm is set (S102), and the task of the current slot is determined from the schedule table to enter an execution state (S103).

一方で、前記時間エラー判定フラグが“しない”の場合(S104のno)、前のスロットのタスクについては待機状態にする(S107)その後は通常時同様の処理を実行する(S102、S103)。   On the other hand, if the time error determination flag is “NO” (no in S104), the task in the previous slot is set in a standby state (S107), and thereafter, the same processing as normal is executed (S102, S103).

このようにして時分割制御による跨り処理を実行することにより、タスクに設定された時間エラー判定フラグの状態に応じて、タスクを待機状態にすることや強制終了を行い、他のウィンドウを跨るタスクの処理について実行可能となる。   By executing straddle processing by time-sharing control in this way, depending on the state of the time error determination flag set for the task, the task is put in a standby state or forcibly terminated, and the task straddles other windows This process can be executed.

S103において、現在スロットのタスクを実行する際には、実行するタスクの現在の状態に応じて処理を行う。例えば待機状態(自らリソースの取得要求による待機状態、またはタスク管理部により待機命令)であれば、それぞれの待機状態に応じたリソースの開放や実行可能状態への遷移命令により動作を再開する。また休止状態であれば、起動により実行可能状態と遷移させる。   In S103, when executing the task of the current slot, processing is performed according to the current state of the task to be executed. For example, in a standby state (a standby state based on a resource acquisition request by itself or a standby instruction by the task management unit), the operation is resumed by a resource release or a transition instruction to an executable state according to each standby state. If it is in a dormant state, it transitions to an executable state upon activation.

前のスロットのタスクが実行状態であった場合の処理として、タスク管理部501は、強制終了の代わりに一度待機状態にさせ、次のタスクを実行状態にした後等に休止状態にさせても良い。そのようにすることにより次のタスクを早く実行状態にすることが可能になる。   As a process in the case where the task in the previous slot is in the execution state, the task management unit 501 may place the task in the standby state once instead of forcibly ending and put the next task in the execution state or the like, good. By doing so, the next task can be quickly executed.

<子タスクの管理>
前記跨り処理においては、それぞれのタスクが生成した子タスクについても同様に管理することが必要となる。例えばスロットIDS3にて、タスクT3が子タスク(例えばタスクT3A)を生成した場合、跨り処理においては子タスクも同様に待機状態にする必要がある。そのためタスク管理部501は、待機状態にする処理をタスクT3およびタスクT3Aの双方に実施する。また同様に待機状態からの再開も、タスクT3およびタスクT3Aの双方に実施する。これにより、タスクが子タスクを生成した場合にも、同様に跨り判定に基づく処理が可能となる。
<Child task management>
In the crossing process, it is necessary to similarly manage child tasks generated by the respective tasks. For example, when the task T3 generates a child task (for example, the task T3A) in the slot IDS3, it is necessary to similarly put the child task in a standby state in the crossing process. Therefore, the task management unit 501 performs the process for setting the standby state on both the task T3 and the task T3A. Similarly, restart from the standby state is performed for both task T3 and task T3A. As a result, even when the task generates a child task, processing based on the straddling determination is possible.

上記子タスクへの処理については、子タスクを生成したタスクが、前記子タスクのIDをタスク管理部501に通知する、または各タスクが待機状態に遷移する命令を受けた場合に、各タスクの管理の基で、子タスクを待機状態に移行する、といった方法により実現可能である。   Regarding the processing for the child task, when the task that generated the child task notifies the task management unit 501 of the ID of the child task or receives an instruction for each task to transition to a standby state, It can be realized by a method of shifting a child task to a standby state under management.

<動作ログ>
動作ログの作成方法について図9を用いて説明する。ここでは各スロットでのタスクの開始時刻、終了時刻、タスクID、終了時の状態について記録する例を示している。これら状態を動作ログ管理部508はタスク管理部501からタスクの状態遷移のタイミング等で受信し、動作ログ508として記録する。特に終了時の状態について前記跨り判定処理においてエラーログおよび跨り時の動作を記録しておくことにより、異常が発生したため強制終了したか、終了しなかったが想定通りの跨り処理が発生したかを動作ログから確認することが可能となる。
<Operation log>
An operation log creation method will be described with reference to FIG. Here, an example is shown in which the task start time, end time, task ID, and state at the end of each slot are recorded. The operation log management unit 508 receives these states from the task management unit 501 at a task state transition timing or the like, and records them as an operation log 508. In particular, by recording the error log and the operation at the time of straddling in the straddle determination process for the state at the end, whether the compulsory termination occurred because of an abnormality or whether the straddling process as expected did not occur It can be confirmed from the operation log.

動作ログについては、前記通信管理部502およびネットワークリンク301および通信装置3等を介して外部に出力することにより、車両制御システムの状態を外部から監視可能となる。   The operation log is output to the outside via the communication management unit 502, the network link 301, the communication device 3, and the like, so that the state of the vehicle control system can be monitored from the outside.

本発明にかかる第2の実施例について説明する。第1の実施例と異なる点は、タスク管理部501が、タスク間で共有アクセスするデータについてコピーを行う点である。   A second embodiment according to the present invention will be described. The difference from the first embodiment is that the task management unit 501 copies data that is shared and accessed between tasks.

図10はタスク505とタスクがアクセスするデータテーブル507内部の領域について示したものである。ここで領域Aはタスク1とタスク2が共にアクセスを行い、セマフォ等による排他制御が必要な領域である。そしてタスク2は跨りを行うタスクである。このような場合に、タスク2が領域Aへのアクセスを行うためセマフォを獲得している際に、タスク2が前記跨り判定時の処理において一時停止を行った場合、タスク1が領域Aにアクセスできず、デッドロック等を起こす可能性がある。   FIG. 10 shows the task 505 and the area inside the data table 507 accessed by the task. Here, the area A is an area that is accessed by both the task 1 and the task 2 and requires exclusive control by a semaphore or the like. Task 2 is a task for straddling. In such a case, when task 2 has acquired a semaphore to access area A, task 1 accesses area A if task 2 pauses in the process of crossing determination There is a possibility of deadlock and the like.

そこでタスク管理部501は、タスク2など跨りを行うタスクの実行開始時には、共有領域のデータについて、別の領域(例えば領域B)にコピーを行う。このようにすることにより、タスク2は排他制御を行うリソースにアクセスする必要が無くなり、デッドロックを防ぐことが可能となる。   Therefore, the task management unit 501 copies the data in the shared area to another area (for example, area B) at the start of execution of a task that straddles task 2 or the like. By doing so, the task 2 does not need to access the resource for exclusive control, and it becomes possible to prevent deadlock.

また同様にタスク2の終了時、またはタスク2の次のタスクの実行開始前、またはタスク1の実行開始前に、前記領域Bのデータについて領域Aに書き戻すことにより、タスク1からのデータアクセスに対しても正しく値を返すことが可能となる。   Similarly, data access from task 1 is performed by writing back data in area B to area A at the end of task 2, or before execution of the next task after task 2 or before execution of task 1 is started. It is possible to return a value correctly for.

ここでタスク2の動作については、セマフォの獲得(排他制御リソースへのアクセス権限取得)命令についてタスク管理部501を介してアクセスし、アクセスするデータについて排他制御を行わない領域にコピーを行った場合には、前記タスク管理部501が前記セマフォの獲得命令を実行しない様に隠蔽することにより、上記コピーを行う場合と行わない場合とでタスク2のソースコードを置き変えすることなくソフトを移植することが可能となる。   Here, with regard to the operation of task 2, the semaphore acquisition (acquisition of access authority to exclusive control resource) instruction is accessed via the task management unit 501, and the accessed data is copied to an area where exclusive control is not performed. The task management unit 501 hides the semaphore acquisition instruction so as not to execute it, so that the software can be ported without replacing the source code of task 2 depending on whether the copying is performed or not. It becomes possible.

この例でタスク2がアクセスするデータ領域を領域Aから領域Bに変更する方法としては、仮想メモリの様なアクセス方式に対して物理メモリのマップを変更する、タスク2の保持するデータアクセスのアドレス、またはポインタを書き換える、ソースコードやオブジェクトコードの変数名(ラベル)を書き換える、等の手段により実現可能である。   In this example, the data area accessed by the task 2 is changed from the area A to the area B. The physical memory map is changed for the access method such as virtual memory, and the data access address held by the task 2 is changed. Or by rewriting the pointer, rewriting the variable name (label) of the source code or the object code, and the like.

ここでタスク管理部501がデータをコピーする時間については、タスク2のスロットの開始時間をt2、コピーの所要時間をtcとした場合、前のタスクが終了している場合には時刻t2−tcに開始を行うことが望ましい。そのようにすることにより、データのコピーを行う場合でも、タスクの実行開始時間を遅らせずに実行可能となる。同様にタスク2のスロットの開始時間前に上記書き戻し処理(所要時間tcr)を行う場合には、その時間についても考慮し、t2−tc−tcrの時間に処理を開始することが望ましい。   Here, regarding the time for the task management unit 501 to copy the data, if the start time of the slot of task 2 is t2 and the time required for copying is tc, the time t2-tc is when the previous task is completed. It is desirable to start on. By doing so, even when data is copied, it can be executed without delaying the task execution start time. Similarly, when the write-back process (required time tcr) is performed before the start time of the slot of task 2, it is preferable to start the process at time t2-tc-tcr in consideration of that time.

本発明にかかる第3の実施例について説明する。本実施例においては、スケジュールテーブル507について設計情報や動作時に測定した情報から自動的に作成を行う。   A third embodiment according to the present invention will be described. In this embodiment, the schedule table 507 is automatically created from design information and information measured during operation.

設計情報1101の例について図11に示す。ここでは各タスクの設計情報について、タスクのID、制御周期、(最悪時)実行時間、跨り許可の有無、といった情報を与える。これら情報を基にスケジュールテーブル507を作成する。   An example of the design information 1101 is shown in FIG. Here, for the design information of each task, information such as task ID, control cycle, (worst case) execution time, presence / absence of crossing permission is given. A schedule table 507 is created based on these pieces of information.

これにより、例えばタスクIDがT3のタスクは、跨り許可がOKとなっていることから、例えば図8に示す様なスケジュールテーブルを作成し、跨りが発生するスロット(S3およびS5)について、時間エラー判定を“しない”とするフラグを付与する。このようにすることにより、設計情報1101から、スケジュールテーブル507を作成することが可能になる。   As a result, for example, for the task with the task ID T3, the crossing permission is OK, so for example, a schedule table as shown in FIG. 8 is created, and a time error is generated for the slot (S3 and S5) where the crossing occurs. A flag indicating that the determination is “not performed” is given. In this way, the schedule table 507 can be created from the design information 1101.

この例において設計情報1101でタスクIDがT2のタスクは跨り許可をOKとしているが、跨りを発生させずに配置可能であるため、時間エラー判定を“しない”とするフラグを付与しない。   In this example, the task whose task ID is T2 in the design information 1101 is set to allow crossing permission, but since it can be arranged without causing crossing, a flag indicating that the time error determination is “not done” is not given.

またこの例において、タスクIDがT3のタスクの跨り許可がNGであった場合には、スケジュールテーブル507の自動作成時に、跨りNGのためスケジューリングテーブル作成が不可能である旨のエラーメッセージを通信管理部502を介してネットワークリンク301や通信装置3に出力する。   Also, in this example, when the crossing permission of the task with the task ID T3 is NG, when the schedule table 507 is automatically created, an error message indicating that the scheduling table cannot be created due to the crossing is communication management. The data is output to the network link 301 and the communication device 3 via the unit 502.

ここで跨り許可NGとするタスクについては、例えば安全関連機能など、跨り等による処理の中断が好ましくないタスクについて跨り許可NGという指示を与えることにより、自動作成時でも安全関連機能は跨りを発生させず、処理の遅延が発生しない設計が可能になる。   Here, for tasks for which crossover permission NG, for example, safety-related functions such as safety-related functions, it is possible for a safety-related function to generate a crossover even during automatic creation by giving an instruction of crossover permission NG for a task for which processing is not interrupted due to crossing. Therefore, it is possible to design without causing a processing delay.

またスケジュールテーブルの作成については、上記設計情報1101からの作成だけでなく、ネットワークリンク301からの取得も可能である。これにより機能の更新時において、処理装置内部で計算するだけでなく、外部ネットワークからスケジュール情報を設定することも可能となる。   The schedule table can be created not only from the design information 1101 but also from the network link 301. As a result, when updating the function, not only the calculation inside the processing apparatus but also the schedule information can be set from the external network.

上記スケジュールテーブル507の自動作成については、車両制御システムの設計時や初回の起動時だけでなく、例えば車両制御システム2の起動時(イグニッションのON等)に毎回計算することや、車両制御システム2の構成が変更になった場合に、前記設計情報1101の制御周期や実行時間の再計算および再取得も含めて実行することも可能である。これによりシステムの状態の変化に合わせて、スケジュールテーブル507を再計算し、システムの状態に合わせたスケジュールテーブルの構築が可能となる。   The automatic creation of the schedule table 507 is calculated not only at the time of designing the vehicle control system or at the first startup, but also every time the vehicle control system 2 is started (ignition is turned on, etc.) Can be executed including recalculation and reacquisition of the control period and execution time of the design information 1101. As a result, the schedule table 507 is recalculated in accordance with the change in the system state, and the schedule table can be constructed in accordance with the system state.

本発明の第4の実施例にかかるスケジューリング実行時の判定フローについて、時間エラー判定フラグを用いず、設計情報である予定実行時間による自動判定を行う例について図12を用いて説明する。第1の実施例と異なる点は、図1におけるS104の時間エラーフラグによる判定が、S1201の累積実行時間と想定実行時間による判定に置き換わっている点である。   With reference to FIG. 12, description will be given of an example in which a determination flow at the time of scheduling execution according to the fourth embodiment of the present invention is performed by automatic determination based on a scheduled execution time that is design information without using a time error determination flag. The difference from the first embodiment is that the determination based on the time error flag in S104 in FIG. 1 is replaced with the determination based on the accumulated execution time and the assumed execution time in S1201.

ここで動作例について、図13に記載されたタスクごとの制御周期および予定実行時間を基に、図14に示す開始および終了時刻で各タスクが動作している例について説明する。   Here, an operation example will be described in which each task is operating at the start and end times shown in FIG. 14 based on the control cycle and the scheduled execution time for each task described in FIG.

この場合で例えば時刻0.4において、タスクT2は、設計情報1101の示す予定実行時間(0.2)を超過しているため、S1201の判定のyesにより、前のスロットのタスク(T2)を強制終了させる。一方で時刻1.0において、タスクT3の累積実行時間(0.6ms)は図13で示す設計情報の予定実行時間(2.2ms)を超過していないため、S1201の判定はnoとなり、跨り処理を行う。   In this case, for example, at time 0.4, since the task T2 exceeds the scheduled execution time (0.2) indicated by the design information 1101, the task (T2) of the previous slot is determined by the determination of S1201. Force termination. On the other hand, at time 1.0, the cumulative execution time (0.6 ms) of task T3 does not exceed the scheduled execution time (2.2 ms) of the design information shown in FIG. Process.

このようにしてスケジュールテーブルによる時間エラー判定フラグを用いない場合でも、タスクごとの設計情報の予定実行時間と累積実行時間を比較することにより跨り判定を行うことが可能となる。   Thus, even when the time error determination flag based on the schedule table is not used, it is possible to perform the straddle determination by comparing the scheduled execution time of the design information for each task with the accumulated execution time.

この場合、図13に示す設計情報1301についてはスケジュールテーブル507、またはデータテーブル506などと同様にECU内部に保有する。   In this case, the design information 1301 shown in FIG. 13 is held in the ECU similarly to the schedule table 507 or the data table 506.

以上説明した実施例によれば、時間駆動によるスケジューリングにおいて、他のタスクのスロットを跨る必要があるタスクが存在している場合に、タスクに跨り処理を許可する情報を付与し、跨り処理を許可されたタスクに対しスロットの終端で動作していた場合に一時停止する処理を行う。即ち、特定のタスクについては、タスクのウィンドウ時間を過ぎた場合でも強制終了させずにタスクの実行を一時中断する。これにより、時間駆動スケジューリングを実現する際に、実行時間の長いタスクを分割する再設計を不要にするなど、タスクの統合を容易化させつつかつ制御システムのタスクの動作時間に影響を与えないことが可能になる。これにより、時間駆動スケジューリングで動作する高信頼なシステムでタスクを統合することが容易となる。   According to the embodiment described above, in the time-driven scheduling, when there is a task that needs to straddle slots of other tasks, the information that permits the straddle process is added and the straddle process is permitted. If the task is running at the end of the slot, the task is paused. In other words, for a specific task, even if the task window time has passed, the task execution is suspended without being forcibly terminated. As a result, when implementing time-driven scheduling, it is not necessary to redesign tasks that divide long-running tasks, making task integration easier and not affecting the operating time of control system tasks. Is possible. This facilitates task integration in a highly reliable system that operates with time-driven scheduling.

また、前記タスクが子タスクを生成する処理を行う場合でも同様に跨り処理を行うことが可能となる。また、これら処理について動作ログを記録することにより、タスクが跨り等を行った場合でも外部からその動作が確認可能となる。   Even when the task performs a process of generating a child task, it is possible to perform the straddle process in the same manner. Further, by recording an operation log for these processes, it is possible to confirm the operation from the outside even when a task goes over.

また別の実施例においては、タスク間で共有するデータがある場合に、前記データを予め別の領域に移すことにより、跨り処理時のタスクのリソース保持を防ぐことが可能となる。またそのタイミングを予めコピー時間を考慮したタイミングで実施することにより、タスクの実行開始を遅らせることなく実行状態に移行することが可能となる。   In another embodiment, when there is data shared between tasks, it is possible to prevent the resource of the task from being held during the crossing process by moving the data to another area in advance. In addition, by executing the timing in advance in consideration of the copy time, it is possible to shift to the execution state without delaying the task execution start.

また別の実施例においては、スケジュールテーブルについて設計情報や測定した動作の情報から自動的に跨り処理を含むテーブルを作成することが可能となる。   In another embodiment, a table including a straddling process can be automatically created from design information and measured operation information for a schedule table.

さらに別の実施例では、跨り処理を実施するフラグを有しない場合でも、タスクの予定実行時間と累積実行時間から跨り処理を行うか否かを判定し、上記跨り処理を実現することが可能となる。   In yet another embodiment, even if there is no flag for executing the straddling process, it is possible to determine whether to perform the straddling process from the scheduled execution time and the accumulated execution time of the task, and to realize the straddling process. Become.

1…車両システム、2…車両制御システム、3…通信装置、4…車両制御システム、5…駆動装置、6…認識装置、7…出力装置、8…入力装置、9…通知装置、301…ネットワークリンク、302…ECU、303…GW、401…プロセッサ、402…I/O、403…タイマ、404…ROM、405…RAM、406…内部バス、501…タスク管理部、502…通信管理部、503…時間管理部、504…動作ログ管理部、505…タスク、506…データテーブル、507…スケジュールテーブル、508…動作ログ、1101…設計情報、1301…設計情報 DESCRIPTION OF SYMBOLS 1 ... Vehicle system, 2 ... Vehicle control system, 3 ... Communication apparatus, 4 ... Vehicle control system, 5 ... Drive apparatus, 6 ... Recognition apparatus, 7 ... Output apparatus, 8 ... Input apparatus, 9 ... Notification apparatus, 301 ... Network Link 302 ... ECU 303 ... GW 401 401 Processor 402 ... I / O 403 Timer Timer 404 ROM 405 RAM 406 Internal bus 501 Task management unit 502 Communication management unit 503 ... Time management unit, 504 ... Operation log management unit, 505 ... Task, 506 ... Data table, 507 ... Schedule table, 508 ... Operation log, 1101 ... Design information, 1301 ... Design information

Claims (10)

時間によりタスクを起動する制御を行う車両制御装置において、
各タスクの起動時間に実行状態である実行中タスクを確認して、該実行中タスクが継続実行可能であるか否かを判定し、
前記実行中タスクが継続実行可能と判定される場合には、前記実行中タスクの一時停止を行い、前記実行中タスクが継続実行可能でないと判定される場合には、前記実行中タスクの終了を行うことを特徴とする車両制御装置。
In a vehicle control device that performs control to start a task according to time,
Check the running task that is in the running state at the start time of each task, determine whether the running task can be continuously executed,
When it is determined that the running task can be continuously executed, the running task is temporarily stopped. When it is determined that the running task cannot be continuously executed, the running task is terminated. The vehicle control apparatus characterized by performing.
請求項1に記載の車両制御装置において、
前記継続実行可能である場合の判断は、前記実行中タスクの起動時間からの累積実行時間により判定することを特徴とする車両制御装置。
The vehicle control device according to claim 1,
The vehicle control apparatus according to claim 1, wherein the determination when the continuous execution is possible is made based on an accumulated execution time from a start time of the task being executed.
請求項1に記載の車両制御装置において、
前記実行中タスクの子タスクについても実行中タスクと同様に判定後の処理を行うことを特徴とする車両制御装置。
The vehicle control device according to claim 1,
The vehicle control device characterized by performing post-determination processing on the child task of the task being executed as well as the task being executed.
請求項1に記載の車両制御装置において、
各スロットにおけるタスクの実行時間および終了時の動作を記録することを特徴とする車両制御装置。
The vehicle control device according to claim 1,
A vehicle control apparatus for recording task execution time and operation at the end of each slot.
請求項1に記載の車両制御装置において、
継続実行可能であるタスクを起動した際に、前記タスクおよび他タスクが共にアクセスするデータについて前記該タスクのみがアクセスする領域にコピーすることを特徴とする車両制御装置。
The vehicle control device according to claim 1,
When a task that can be continuously executed is activated, data that is accessed by both the task and another task is copied to an area that is accessed only by the task.
請求項5に記載の車両制御装置において、
前記領域へのコピーは、タスクの実行開始時間より以前に実行することを特徴とする車両制御装置。
The vehicle control device according to claim 5, wherein
Copying to the area is executed before the task execution start time, the vehicle control device.
請求項1に記載の車両制御装置において、
該実行中タスクが継続実行可能であるか否かを判定するために用いるスケジューリングテーブルを設計情報から作成することを特徴とする車両制御装置。
The vehicle control device according to claim 1,
A vehicle control device, comprising: creating a scheduling table used for determining whether or not the ongoing task can be continuously executed from design information.
請求項7に記載の車両制御装置において、
前記スケジューリングテーブルにおける継続実行可能であるか否かを、安全性の判定に基づいて設定することを特徴とする車両制御装置。
The vehicle control device according to claim 7, wherein
A vehicle control device that sets whether or not continuous execution is possible in the scheduling table based on the determination of safety.
請求項7に記載の車両制御装置において、
前記スケジューリングテーブルの作成において、設計情報のタスクの制御周期または実行時間を測定またはネットワークから取得し、スケジューリングテーブルを作成することを特徴とする車両制御装置。
The vehicle control device according to claim 7, wherein
In the creation of the scheduling table, a vehicle control apparatus is characterized in that a scheduling period is created by measuring or acquiring a control cycle or execution time of a task of design information from a network.
請求項1または7に記載の車両制御装置を含み、
前記スケジューリングテーブルの作成において、設計情報のタスクの制御周期または実行時間を測定またはネットワークから取得し、各車両制御装置がスケジューリングテーブルを作成することを特徴とする車両制御システム。
Including the vehicle control device according to claim 1 or 7,
In the creation of the scheduling table, a vehicle control system is characterized in that each vehicle control device creates a scheduling table by measuring or obtaining a control period or execution time of a task of design information from a network.
JP2016183623A 2016-09-21 2016-09-21 Vehicle control device and vehicle control system Active JP6803709B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016183623A JP6803709B2 (en) 2016-09-21 2016-09-21 Vehicle control device and vehicle control system
PCT/JP2017/027369 WO2018055907A1 (en) 2016-09-21 2017-07-28 Vehicle control device and vehicle control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016183623A JP6803709B2 (en) 2016-09-21 2016-09-21 Vehicle control device and vehicle control system

Publications (2)

Publication Number Publication Date
JP2018049405A true JP2018049405A (en) 2018-03-29
JP6803709B2 JP6803709B2 (en) 2020-12-23

Family

ID=61690815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016183623A Active JP6803709B2 (en) 2016-09-21 2016-09-21 Vehicle control device and vehicle control system

Country Status (2)

Country Link
JP (1) JP6803709B2 (en)
WO (1) WO2018055907A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08212088A (en) * 1995-02-06 1996-08-20 Matsushita Graphic Commun Syst Inc Information processor and communication processor
JP2001125797A (en) * 1999-10-25 2001-05-11 Seiko Epson Corp Multitask system, recording medium with recorded program therefor and working device
JP2006277634A (en) * 2005-03-30 2006-10-12 Nec Corp Exclusive control method and information processor
JP2007219834A (en) * 2006-02-16 2007-08-30 Toyota Motor Corp Deadline monitoring system and deadline monitoring method
JP2009086733A (en) * 2007-09-27 2009-04-23 Toshiba Corp Information processor, control method of information processor and control program of information processor
JP2011100338A (en) * 2009-11-06 2011-05-19 Hitachi Automotive Systems Ltd Onboard multiple application execution apparatus
JP2011198346A (en) * 2009-11-09 2011-10-06 Denso Corp Scheduling method, program and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08212088A (en) * 1995-02-06 1996-08-20 Matsushita Graphic Commun Syst Inc Information processor and communication processor
JP2001125797A (en) * 1999-10-25 2001-05-11 Seiko Epson Corp Multitask system, recording medium with recorded program therefor and working device
JP2006277634A (en) * 2005-03-30 2006-10-12 Nec Corp Exclusive control method and information processor
JP2007219834A (en) * 2006-02-16 2007-08-30 Toyota Motor Corp Deadline monitoring system and deadline monitoring method
JP2009086733A (en) * 2007-09-27 2009-04-23 Toshiba Corp Information processor, control method of information processor and control program of information processor
JP2011100338A (en) * 2009-11-06 2011-05-19 Hitachi Automotive Systems Ltd Onboard multiple application execution apparatus
JP2011198346A (en) * 2009-11-09 2011-10-06 Denso Corp Scheduling method, program and apparatus

Also Published As

Publication number Publication date
WO2018055907A1 (en) 2018-03-29
JP6803709B2 (en) 2020-12-23

Similar Documents

Publication Publication Date Title
JP6376312B1 (en) Control device, program update method, and computer program
JP7042138B2 (en) Processing equipment
JP5829890B2 (en) Semiconductor data processing apparatus, time trigger communication system, and communication system
WO2017188109A1 (en) Vehicle control device and vehicle system
CN105094084B (en) Support the service and system that the coherence data on multinuclear controller accesses
WO2020208954A1 (en) In-vehicle computer, in-vehicle communication system, computer execution method, and computer program
KR102485288B1 (en) Controller for vehicle and operating system scheduling method thereof
WO2018055907A1 (en) Vehicle control device and vehicle control system
JP6861591B2 (en) Vehicle control unit
CN115248724A (en) Real-time scheduling for heterogeneous multi-core systems
EP3637262B1 (en) Verification device for vehicle control device and vehicle control device
JP6796040B2 (en) Access control device
CN113641297A (en) Data storage method of automobile instrument and related product
CN112486142B (en) Method and system for integrating virtualized IO architecture and automobile application in ECU
JP2020021506A (en) Electronic controller and session establishing program
JP7468308B2 (en) On-vehicle ECU, program, and information processing method
JP7463947B2 (en) On-vehicle ECU, program, and information processing method
WO2023032254A1 (en) Electronic system and electronic control device
WO2021193145A1 (en) In-vehicle information processing device, control method, and computer program
CN110262522B (en) Method and apparatus for controlling an autonomous vehicle
Knirsch et al. Prioritized access arbitration to shared resources on integrated software systems in multicore environments
JP2023001993A (en) Ota master, system, method, program, and vehicle
JP2022090901A (en) On-vehicle network system
Gai et al. A fully Open-Source platform for automotive systems
CN107025144B (en) Method for writing and reading a data set

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160923

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170120

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170126

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200331

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200529

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20201104

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201201

R150 Certificate of patent or registration of utility model

Ref document number: 6803709

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250