JP7409567B2 - Automotive computer control method and vehicle electronic control device - Google Patents
Automotive computer control method and vehicle electronic control device Download PDFInfo
- Publication number
- JP7409567B2 JP7409567B2 JP2023533039A JP2023533039A JP7409567B2 JP 7409567 B2 JP7409567 B2 JP 7409567B2 JP 2023533039 A JP2023533039 A JP 2023533039A JP 2023533039 A JP2023533039 A JP 2023533039A JP 7409567 B2 JP7409567 B2 JP 7409567B2
- Authority
- JP
- Japan
- Prior art keywords
- thread
- functional safety
- abnormality
- execution
- interrupt
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 130
- 230000005856 abnormality Effects 0.000 claims description 139
- 238000012545 processing Methods 0.000 claims description 35
- 230000008859 change Effects 0.000 claims description 17
- 230000007246 mechanism Effects 0.000 claims description 15
- 238000001514 detection method Methods 0.000 claims description 10
- 230000001133 acceleration Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 82
- 230000006870 function Effects 0.000 description 69
- 238000004364 calculation method Methods 0.000 description 66
- 238000013461 design Methods 0.000 description 15
- 230000002159 abnormal effect Effects 0.000 description 8
- 230000000737 periodic effect Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 239000000470 constituent Substances 0.000 description 4
- 230000003111 delayed effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002040 relaxant effect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric 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/02—Electric 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
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)
- Safety Devices In Control Systems (AREA)
Description
本国際出願は、2021年7月9日に日本国特許庁に出願された日本国特許出願第2021-114366号に基づく優先権を主張するものであり、日本国特許出願第2021-114366号の全内容を本国際出願に参照により援用する。 This international application claims priority based on Japanese Patent Application No. 2021-114366, which was filed with the Japan Patent Office on July 9, 2021. The entire contents are incorporated by reference into this international application.
本開示は、自動車用コンピュータの制御方法、及び車両用電子制御装置に関する。 The present disclosure relates to a method of controlling a vehicle computer and a vehicle electronic control device.
下記特許文献1には、実行中のプログラムに異常が生じたか否かを判定し、プログラムに異常が生じた場合に、プログラムの処理順序を、通常制御スケジューリングパターンから安全制御スケジューリングパターンに切り替える車両用電子制御装置が開示されている。
特許文献1では、安全監視プログラムで通常制御プログラムを含むプログラムの異常が検出されるが、異常を検出した後は、スケジュールが安全制御スケジューリングパターンへ切替られる。しかし、切り替え後のプログラムの実行の元となるタイムパーテションされたプログラムには、通常制御プログラムの監視を実行するスレッドは含まれるが、本来機能を実行するスレッド(例えば非機能安全要件)は、含まれていないと推察される。この結果、安全制御スケジュールパターンへ切替後は、異常が発生していない本来機能も含めて、全て縮退制御していると推察される。
In
発明者の詳細な検討の結果、この構成では、安全制御を優先して実行できるものの、安全制御スケジュールで非優先となるスレッドが長時間完了できないなど、非優先となるスレッド、特に非機能安全要件のスレッドへの悪影響が生じやすいという課題が見出された。 As a result of the inventor's detailed study, although this configuration allows safety control to be executed with priority, threads that are not prioritized in the safety control schedule may not be able to complete for a long time, and threads that are not prioritized in the safety control schedule, especially non-functional safety requirements. The problem was found that the threads were likely to be adversely affected.
より詳細には、上記特許文献1の技術は、安全監視プログラムで、異常が検出されたときに、非機能安全要件のスレッドと機能安全要件のスレッドをパーテショニングする。そして、機能安全対応設計を機能安全スレッドのみに注力することにより、システム設計のコストダウンを狙っている。反面、安全制御スケジューリングパターンに切り替えられた後の非機能安全スレッドのリアルタイム性については、言及されていない。また、上記特許文献1の請求項1には、安全制御スケジューリングパターンへ移行した後のタイムパーテションでは、通常制御プログラムを除くと記載されているので、極論すれば、非機能安全要件のスレッドはすべて縮退処理となるとも解釈できる。
More specifically, the technique disclosed in
本開示の1つの局面は、全てのスレッドが規定時間内に実行されやすいスレッド自動車用コンピュータの制御方法、或いは車両用電子制御装置を提供できるようにすることにある。 One aspect of the present disclosure is to provide a threaded vehicle computer control method or vehicle electronic control device in which all threads are likely to be executed within a specified time.
本開示の一態様は、機能安全スレッド、及び少なくとも1つの非機能安全スレッド、を予めスケジューラで定義された優先順位に基づく並列処理で実行可能な車両用コンピュータにて実行される自動車用コンピュータの制御方法である。機能安全スレッドは、車両の安全に関する値を演算するスレッドを表す。また、非機能安全スレッドは、機能安全スレッドを除くスレッドを表す。 One aspect of the present disclosure provides an automotive computer control executed by a vehicle computer capable of executing a functional safety thread and at least one non-functional safety thread in parallel processing based on priorities defined in advance by a scheduler. It's a method. The functional safety thread represents a thread that calculates values related to vehicle safety. Furthermore, non-functionally safe threads refer to threads other than functionally safe threads.
自動車用コンピュータの制御方法では、機能安全スレッドの異常を検知し、機能安全スレッドの異常が検知された場合に、スケジューラを変更して優先順位を変更する。 In a method for controlling an automobile computer, an abnormality in a functional safety thread is detected, and when an abnormality in the functional safety thread is detected, the scheduler is changed to change the priority order.
このような制御方法によれば、機能安全スレッドに異常が生じた場合だけ、スレッドを実行する際の優先順位を変更できる。機能安全スレッドの安全機構が異常を検出して異常処置を実行するスレッドが他のスレッドが実行中のため実行待ちになっていても、両スレッドの相対的実行優先順位を変更して、機能安全の安全を担保する許容時間内に処理を完了しやすくすることができる。かつ、非機能安全スレッドについても本来機能を縮退させる機会を極力減らすことができる。 According to such a control method, the priority order for thread execution can be changed only when an abnormality occurs in the functional safety thread. The safety mechanism of the functional safety thread detects an abnormality and executes the abnormal action.Even if the thread is waiting for execution because another thread is running, the safety mechanism of the functional safety thread can change the relative execution priority of both threads to ensure functional safety. This makes it easier to complete processing within an allowable time that ensures safety. In addition, it is possible to reduce as much as possible the chances of degenerating the original functions of non-functionally safe threads.
つまり、スケジューラを変更して異常検出時のスケジュールに切り替える場合、機能安全要件のスレッドの規定の処理を実行後に非機能安全要件の規定の処理の実行を許容するので、非機能安全要件の不要な縮退を避けるスケジューリングが可能となる。よって、全てのスレッドが規定時間内に実行されやすい構成とすることができる。 In other words, when changing the scheduler to switch to the schedule when an abnormality is detected, it is possible to execute the specified processing of the non-functional safety requirements after the specified processing of the thread of the functional safety requirements is executed. Scheduling that avoids degeneracy becomes possible. Therefore, it is possible to provide a configuration in which all threads are likely to be executed within the specified time.
[1.本開示の概要]
[1-1.背景]
CASE(Connected、Autonomous、Shared & Services、Electric)、Maas(Mobility as a Service)社会においては、機能安全、セキュリティ、SOTIF(Safety of the Intended Functionality)等の諸要件が三つ巴になったより複雑なシステムの中で、諸要件の相互作用や排他的制御を考慮する必要がある。その際、システムの機能安全を第1に、性能や利便やコストとのバランスを考え、商品性を向上するアーキテクチャを設計することが、システム・製品の差別化を考えるうえで有意義である。[1. Summary of this disclosure]
[1-1. background]
In the CASE (Connected, Autonomous, Shared & Services, Electric) and Maas (Mobility as a Service) society, more complex systems with three-way requirements such as functional safety, security, and SOTIF (Safety of the Intended Functionality) are required. Among these, it is necessary to consider the interaction of various requirements and exclusive control. In this case, it is meaningful to design an architecture that improves marketability by placing the functional safety of the system first, considering the balance between performance, convenience, and cost, and considering the differentiation of systems and products.
特に、OTA(Over The Air)や5G技術を活用した拡張性のある、つながるシステムが存在する。つながるシステムでは、車両に実装したソフトウェアがSOP(Start Of Production;量産の開始)時点と、SOP後のライフサイクルの間に、システムに搭載されるアプリケーションが逐次変化して行くことが予測される。その変化の都度、例えば当初実装されたソフトウェアに更新プログラムを充てる都度、プログラムの実行検証をベースからやり直すのは、非効率で経済的ではない。また、セキュリティインシデント対策を考慮したソフトウェアライフサイクルにおいては、この傾向がより顕著となることが予測される。 In particular, there are scalable and connected systems that utilize OTA (Over The Air) and 5G technologies. In a connected system, it is expected that the applications installed in the system will change sequentially between the SOP (Start Of Production) of the software installed in the vehicle and the life cycle after the SOP. It is inefficient and uneconomical to redo the program execution verification from the beginning each time there is a change, for example, each time an updated program is applied to the originally implemented software. Furthermore, this trend is expected to become more pronounced in software lifecycles that take security incident countermeasures into consideration.
さらに、車両においても、今後は、非論理的と言われるAIも多く実装される。一旦、システム異常が発生した時の論理性と論証を重視される機能安全の担保は、システム異常や構成部品故障、セキュリティインシデント又は性能限界、或いは、ミスユースにおいてもロバスト性の高いシステムアーキテクチャを要求される。 Furthermore, in the future, many AIs that are said to be illogical will be implemented in vehicles. Ensuring functional safety, which emphasizes logic and proof once a system abnormality occurs, requires a system architecture that is highly robust against system abnormalities, component failures, security incidents, performance limits, or misuse. Ru.
[1-2.機能安全エレメント実装上の課題]
今後も、車両に実装されるいろいろなアプリケーションでは、ドメイン化(例えば、分散化)と統合化とが車両のセグメント毎に最適化されるようにトライされると思われる。この際、統合化されたアプリケーションをプロセスに分割し、最終的には、CPUコア(以下、単にコアともいう)やメモリ或いは入出力群を共有化するスレッドを疑似並列的にスケジュール制御するニーズは不可欠である。この様子は、PCソフトウェアに実装されるOSのタスクマネージャの制御に類似している。[1-2. Challenges in implementing functional safety elements]
In the future, it is likely that domainization (eg, decentralization) and integration will be attempted to be optimized for each segment of the vehicle in various applications implemented in vehicles. At this time, there is a need to divide the integrated application into processes and ultimately control the schedule in a pseudo-parallel manner of threads that share CPU cores (hereinafter simply referred to as cores), memory, or input/output groups. It is essential. This situation is similar to control by an OS task manager implemented in PC software.
機能安全エレメントの実装の場合は、車両機能(以下、アイテム)に対して、その機能を実現するための構成要素(以下、エレメント)に異常が発生したとき、安全目標(SG:Safety Goal)を設定する。そして、安全機構(SM:Safety Mechanism)を付加し、許容された時間(FTTI:Fault Tolelant Time Interval)以内に安全目標を、機能安全以外のエレメントと無干渉になることを担保して実行させる。この手順は、セキュリティやSOTIFが要求されたシステムでも例外ではなく実施されうる。本開示では、機能安全のSMの実行を担保するため、CPUコアを共有する他のスレッドのコア処理が競合する場合においても、動的スケジューリングの設計手法を活用し、機能安全のSMの実行を担保する設計アーキテクチャを提供する。 In the case of implementing functional safety elements, safety goals (SG) are set when an abnormality occurs in a component (hereinafter referred to as an element) for realizing a vehicle function (hereinafter referred to as an item). Set. Then, a safety mechanism (SM) is added to execute the safety goal within a permissible time (FTTI: Fault Tolerant Time Interval) while ensuring that there is no interference with elements other than functional safety. This procedure can be implemented even in systems where security or SOTIF is required. In this disclosure, in order to ensure the execution of a functionally safe SM, even when core processing of other threads that share a CPU core compete, a dynamic scheduling design method is utilized to ensure the execution of a functionally safe SM. Provide a design architecture that supports
[1-3.本開示でのアーキテクチャ採用の効果]
一方、従来のソフトスケジューリングにおいては、タイムトリガ制御(例えば周期制御を含む)、或いは各スレッドをパーテションし、カーネル特権による割り込み制御が行われるのが一般的である。いずれの場合も機能安全の安全要求仕様(例えば、FTTI等)と直接的に関連付けられたスケジューリングをディスパッチするわけではない。[1-3. Effects of adopting architecture in this disclosure]
On the other hand, in conventional soft scheduling, time-trigger control (including periodic control, for example) or partitioning of each thread and interrupt control using kernel privileges are generally performed. In either case, scheduling directly associated with functional safety safety requirement specifications (for example, FTTI, etc.) is not dispatched.
一般的な自動車用のソフトウェアのプロセスでは、想定されたアプリケーションの内部の動作状態がスレッドレベルまで、カバレッジされて検証し、有害なバグのない状態で、SOP時に実装されてリリースする。また、一般的な機能安全エレメントの組込実装では、ソフトウェアの継続に深刻なランタイムエラーが発生した時のみ冗長な他のデバイスからのリセット制御を期待する(例えば、ウォッチドッグリセット)。そして、その他のアプリケーションプログラムの機能上の診断異常(例えば、センサ、負荷、内部機能構成パーツのダイアグ診断)では、各タスクのワースト実行時間や実行周期の組合せを考慮したタスクスケジュール設計をする。タスクスケジュール設計には、例えば、プライオリティ設定、デッドライン監視等が含まれる。 In a typical automotive software process, the internal operating state of the assumed application is covered and verified down to the thread level, and it is implemented and released at the time of SOP without harmful bugs. In addition, typical embedded implementations of functional safety elements expect redundant reset control from other devices only when a serious runtime error occurs for software continuity (eg, watchdog reset). For other application program functional diagnostic abnormalities (for example, diagnostic diagnosis of sensors, loads, and internal functional components), task schedules are designed taking into consideration the worst execution time and execution cycle combinations of each task. Task schedule design includes, for example, priority setting, deadline monitoring, and the like.
この場合は、前述のように、SOP後に、当初想定していなかったシステムにつながるアプリケーションが当初設計したタイムスケジュールに影響があるかどうかを、仕様変化点の都度チェックする。このため、必要により、アーキテクチャ自体に設計変更をかける必要性が発生する。また、この可能性を極力回避するために、システムの異常時にはより安全側に振った仕様が採用され、この結果、車両として過度に縮退制御が多くなり商品性が低下する懸念もある。 In this case, as described above, after the SOP, it is checked at each specification change point whether an application that connects to a system that was not initially expected has an impact on the originally designed time schedule. Therefore, if necessary, it becomes necessary to make design changes to the architecture itself. In addition, in order to avoid this possibility as much as possible, specifications are adopted that are more on the safe side in the event of a system abnormality, and as a result, there is a concern that the vehicle will require excessive degeneracy control and its marketability will deteriorate.
そこで、本開示では、SOP後に、想定されていなかった事象が、車両とつながる世界から入ってきた不測の場合においても、システムの異常時には、機能安全の安全機構(SM)の処理を優先するアーキテクチャを提供する。想定されていなかった事象には、当初想定されていなかったアプリケーション追加又は商品の売り手側も想定していないエンドユーザによるアプリケーション接続やインシデント発生が含まれる。また、想定外の外乱(例えば、ネットワーク異常、AIモジュールのデッドロック等)が含まれる。 Therefore, in this disclosure, even in the unexpected case where an unanticipated event enters from the world connected to the vehicle after the SOP, an architecture that prioritizes the processing of the functional safety safety mechanism (SM) in the event of a system abnormality is proposed. I will provide a. Unanticipated events include the addition of an application that was not initially expected, the connection of an application by an end user that was not expected by the product seller, or the occurrence of an incident. It also includes unexpected disturbances (for example, network abnormality, AI module deadlock, etc.).
本開示のアーキテクチャによれば、OTAで変更されたソフトウェアプログラムの設計変更や検証を簡単にすることができる。また、システム異常時の機能安全担保のための安全要求仕様として車両の縮退制御を緩めることにより、商品性が向上する効果が期待できる。また、ベース開発で、経験度の高い設計者がアーキテクチャを確立しておけば、以降のソフトウェアの保守は比較的経験度の浅い設計者において容易に信頼度の高いブランチ開発が可能となるメリットがある。この結果、より再利用性が高くロバスト性の高いソフトウェアライフサイクルが省工数で構築できる。 According to the architecture of the present disclosure, it is possible to easily change the design and verify the software program changed over OTA. In addition, by relaxing vehicle degeneracy control as a safety requirement specification to ensure functional safety in the event of a system abnormality, it is expected that product appeal will be improved. Another advantage is that if an experienced designer establishes the architecture during base development, subsequent software maintenance can be easily done by a relatively inexperienced designer who can develop highly reliable branches. be. As a result, a more reusable and robust software life cycle can be created with less man-hours.
[2.実施形態の構成と本開示の構成との対応関係]
実施形態において、制御演算部11が実行する処理は、本開示での自動車用コンピュータの制御方法に相当する。また、実施形態において、制御演算部11が実行する処理のうち、S130,S150,S170の処理は、本開示での異常検知部による機能に相当し、S10,S20,S30,S180の処理は、本開示での順序変更部による機能に相当する。[2. Correspondence between the configuration of the embodiment and the configuration of the present disclosure]
In the embodiment, the processing executed by the
[3.実施形態]
以下、図面を参照しながら、本開示の実施形態を説明する。[3. Embodiment]
Embodiments of the present disclosure will be described below with reference to the drawings.
[3-1.構成]
図1に示す車両制御システム1は、例えば乗用車等の車両に搭載され、ECU10を備える。ECU10は、電子制御装置であり、特に、本実施形態では車両用の電子制御装置である。[3-1. composition]
A
車両制御システム1は、センサ類21、各種アクチュエータ22を備えてもよい。また、車両制御システム1は、車両外のクラウドサーバ23と通信可能に構成されてもよい。ECU10、センサ類21、各種アクチュエータ22、クラウドサーバ23は、通信バス5或いは図示しない無線ネットワーク等を介して互いに通信可能に構成される。なおECU10には、後述する電源回路及びウォッチドッグタイマ36が含まれる。
The
ECU10は、制御演算部11と、入出力部12と、メモリ13と、を備える。また、ECU10は、制御演算部11が実行する機能の一部として、車両アプリケーション機能16を備える。なお、車両アプリケーション機能16を実現するプログラムの中では、非機能安全機能要件と機能安全機能要件とに従い関連するスレッドがパーテションされる。
The
制御演算部11は、例えば、CPUとして構成される。制御演算部11は、メモリ13に格納されたプログラムを実行することで、車両アプリケーション機能16等の各種機能を実現する。制御演算部11が実行する各種機能には、自動車用コンピュータの制御方法を利用する処理が含まれる。制御演算部11は、疑似並列処理で、複数のスレッドを時分割で実施する。以下、複数のスレッドをスレッド群と表記する。
The
なお、制御演算部11は、異常検知、異常検知に対応して安全を担保するための異常処置、スレッド自体のランタイムエラー検知、ランタイムエラー検知に対応するための異常処置等、各機能を実現するための演算を実施する。
The
入出力部12は、例えば、通信バス5等を用いた通信を行う通信モジュールとして構成され、ECU10に入出力されるデータについての入出力制御を行う。
The input/
車両アプリケーション機能16は、図2に示すように、コア間制御スレッド制御部32、コア内制御スレッド制御部(機能安全要件)33(以下、機能要件部33という)、コア内制御スレッド制御部(非機能安全要件)34(以下、非機能要件部34という)とを備える。
As shown in FIG. 2, the
コア間制御スレッド制御部32は、下記機能を備える。すなわち、
(A1)コア、メモリ13、入出力部12、ランタイムをディスパッチする機能、詳細には、動的スケジューラとしての機能(例えば、MMU/MPUと連携してスレッド制御を行う場合もある)、
(A2)各コアプログラム(例えばアプリケーション)により実行するスレッドを調停する機能、詳細には、コアプログラムの起動、縮退、無視、自己リセット、外部リセット等の処理を含む、
(A3)電源回路及びウォッチドッグタイマ36に対してウォッチドック信号を出力する機能、
(A4)機能要件部33及び非機能要件部34に対してリソース、スケジュールの配分指示を行う機能、
を備える。The inter-core control
(A1) A function to dispatch the core,
(A2) A function to arbitrate threads executed by each core program (for example, an application), in detail, including processes such as starting, degenerating, ignoring, self-resetting, and external reset of the core program,
(A3) A function to output a watchdog signal to the power supply circuit and
(A4) A function of instructing the
Equipped with.
上記コア間制御スレッド制御部32の各機能は、ECU10がプログラムを実行することによって実現される。
Each function of the inter-core control
次に、機能要件部33は、機能安全要件に関するスレッド(以下、機能安全スレッド)を取り扱う。機能安全スレッドとは、車両の安全に関する値(例えば、車両の加減速、操舵に関する値等)を演算するスレッドを表す。
Next, the
機能要件部33は、下記機能を備える。すなわち、
(B1)メモリ13、入出力部12、ランタイムをディスパッチする機能、詳細には、動的スケジューラとしての機能(例えば、MMU/MPUと連携してスレッド制御を行う場合もある)、
(B2)異常が発生したスレッドの実行優先順位を相対的に上げるようにスケジューラを変更する機能、
(B3)コア間制御スレッド制御部32に対して、コア占有時間率、安全機構要件、 FTTI、自動車安全水準レベル(以下、ASIL:Automotive Safety Integrity Level)、デッドライン情報等の実行優先順位を制御する情報源を送信する機能、
を備える。The
(B1)
(B2) A function that changes the scheduler to relatively raise the execution priority of the thread in which the abnormality has occurred;
(B3) For the inter-core control
Equipped with.
上記機能要件部33の各機能は、ECU10がプログラムを実行することによって実現される。
Each function of the
次に、非機能要件部34は、機能安全スレッド以外のスレッドである非機能安全スレッドを取り扱う。非機能要件部34は、下記機能を備える。すなわち、
(C1)メモリ13、入出力部12、ランタイムをディスパッチする機能、詳細には、動的スケジューラとしての機能(例えば、MMU/MPUと連携してスレッド制御を行う場合もある)、
(C2)実行中のスレッドの中断や実行待ちスレッドの実行優先順位を相対的に下げるようにスケジューラを変更する機能、
(C3)コア間制御スレッド制御部32に対して、コア占有時間率等の実行優先順位を制御する情報源を送信する機能、
を備える。Next, the
(C1)
(C2) A function that changes the scheduler to suspend running threads and relatively lower the execution priority of waiting threads;
(C3) A function of transmitting an information source for controlling execution priority such as core occupation time rate to the inter-core control
Equipped with.
上記非機能要件部34の各機能は、ECU10がプログラムを実行することによって実現される。
Each function of the
なお、コア間制御スレッド制御部32、機能要件部33、非機能要件部34は、スレッドの実行継続が機能安全の安全目標(SG)の侵害につながるような異常が生じた際に実行継続不可通知を送信し、実行継続不可通知はそれぞれで共有される。
Note that the inter-core control
[3-2.処理]
[3-2-1.スレッド実行制御処理]
次に、制御演算部11、特にコア間制御スレッド制御部32が実行するスレッド実行制御処理について、図3のフローチャートを用いて説明する。スレッド実行制御処理は、機能要件部33及び非機能要件部34のそれぞれで設定されたスレッド実行優先順位テーブルを取得し、これらのテーブルに基づく順序で処理を実行させる処理である。スレッド実行制御処理は、例えば、予め設定された周期で実施される。[3-2. process]
[3-2-1. Thread execution control processing]
Next, the thread execution control process executed by the
スレッド実行制御処理では、まず、S10で、制御演算部11は、機能要件部33で判定及び書き替えられたスレッド実行優先順位テーブルの取り込みをする。スレッド実行優先順位テーブルは、図5にて示す優先順位ルールで設定される。なお、優先順位ルールについては後述する。
In the thread execution control process, first, in S10, the
続いて、S20で、制御演算部11は、非機能要件部34で判定及び書き替えられたスレッド実行優先順位テーブルの取り込みをする。続いて、S30で、制御演算部11は、コア間制御スレッド制御部32の機能を用いて、実行するスレッドのコアと動的スケジューラのディスパッチ内容更新、及び各コアプログラム(例えばアプリケーション)で実行するスレッドの調停をする。
Subsequently, in S20, the
ディスパッチ内容更新では、制御演算部11は、各コアのスレッド実行情報に基づき、各コアで選択された動的スケジューラに対して、使用するハードウェア資源(例えば、コア、メモリ13、入出力部12、ランタイム)の割り当ての見直しを行う。なお、コア間制御スレッド制御部32の機能は、一般的なパーソナルコンピュータでいうところのタスクマネージャのような役割を担う。
In the dispatch content update, the
また、スレッドの調停では、制御演算部11は、コア稼働率の低いコアの有効活用等を実施する。また、制御演算部11は、各コアの異なるプログラム間で共有するメモリ13や入出力部12が競合しないように、無干渉を担保する。詳細には、制御演算部11は、各コアの動的スケジューラと連携して、メモリ13、読み書き属性、ランタイム等を調停する。
Furthermore, in thread arbitration, the
なお、制御演算部11は、コアプログラムの起動、縮退、無視、自己リセット、外部リセット等の処理を実施する。その後、図3のスレッド実行制御処理を終了する。
Note that the
[3-2-2.スレッド実行制御処理]
次に、制御演算部11が実行するスレッド実行優先順位判定処理について、図4A及び図4Bのフローチャートを用いて説明する。スレッド実行優先順位判定処理は、機能要件部33及び非機能要件部34の機能を用いて、機能安全スレッドの異常の有無に応じて適切なスケジュールを選択し、コア間制御スレッド制御部32に、選択したスケジュールを利用するように要求する処理である。スレッド実行制御処理は、例えば予め設定された周期毎に実施される。なお、制御演算部11が備えるコアが複数の場合は、本処理はコアごとに実行される。また、本処理は、図5にて示す常時周期割り込みとして記載された機能安全(以下、常時SM)にて実行される。[3-2-2. Thread execution control processing]
Next, the thread execution priority determination process executed by the
スレッド実行制御処理では、まず、S110で、制御演算部11は、スケジューラタイマ割り込みで実行するスレッド群の実行待ちはあるか否かを判定する。スケジューラタイマ割り込みには、機能安全スレッドに異常が検知された場合に実施されることが含まれる。機能安全スレッドの異常とは、機能安全スレッドの機能の異常検出だけでなく、例えば、機能安全スレッドが規定時間(すなわち、デッドライン)以内に正常に終了しない事象、実行エラーを生じる事象等が該当する。
In the thread execution control process, first, in S110, the
制御演算部11は、S110で割り込みのスレッド群の実行待ちがないと判定した場合には、S120へ移行し、割り込みタイマ処理を実行した後、図4A及び図4Bのスレッド実行優先順位判定処理を終了する。
When the
一方、制御演算部11は、S110でスケジューラタイマ割り込みのスレッド群の実行待ちがあると判定した場合には、S130へ移行し、機能安全スレッドの異常が、スレッド群の実行を継続できない異常か否かを判定する。すなわち、機能安全の安全目標(以下、SG)を侵害するか否かを判定する。スレッド群の実行を継続できない異常か否かは、例えば、異常の種別が予めスレッド群の実行を継続できない異常に対応付けられているか否かによって判定される。
On the other hand, if the
制御演算部11は、S130でスレッド群の実行を継続できない異常であると判定した場合には、S140へ移行し、コア間制御スレッド制御部32へスレッド群の実行制御を要求し、システムの縮退制御を実施する。ここでは、例えば、カーネルの割り込み制御にて実施される機能安全スレッドであって、予め準備された割込スレッドを実施してもよい。このように機能安全を担保した後、図4A及び図4Bのスレッド実行優先順位判定処理を終了する。
If the
一方、制御演算部11は、S130でスレッド群の実行を継続できる異常あると判定した場合には、S150へ移行し、IOポート等へのイベント割り込みのスレッド群の実行待ちがあるか否かを判定する。ここでのイベント割り込みには、ハードウェアでの強制割り込みを除く。
On the other hand, if the
制御演算部11は、S150でイベント割り込みのスレッド群の実行待ちがあると判定した場合には、S160へ移行し、ソフトウェアマスカブルな強制割り込み処理した後、S170に移行する。
If the
一方、制御演算部11は、S150でイベント割り込みのスレッド群の実行待ちがないと判定した場合には、S160をスキップしてS170へ移行する。続いて、S170で、制御演算部11は、機能安全要件の異常を検知し、異常処置待ちであるか否かを判定する。異常処置待ちとは、異常の検知後に、異常に対する処置が完了されていない状態を表す。
On the other hand, if the
制御演算部11は、S170で機能安全要件の異常を検出し、異常処置待ちであると判定した場合には、S180へ移行する。S180では、機能安全の安全機構要件の設定が、FTTIに対する残り時間優先か、安全度レベル優先か、によって、実行待ちのスレッドの実行優先順位のスケジュールを変更する。つまり、後述する実行優先順位テーブルのうちの、異常時に対応するテーブルである、異常時AN、FTTI優先書き替えAN[1]、ASIL優先書き替えAN[2]の何れかが選択される。
If the
このスケジュールの変更では、非機能安全要件の一時中断と機能安全要件の異常処置について優先的に実行するよう要求される。この要求は、コア間制御スレッド制御部32へスレッド群の実行制御を要求することで実現される。この要求によって、カーネルの割り込み制御が実施され、早期に機能安全スレッド(すなわち本開示での割込スレッド)が実施される。S180の後、図4A及び図4Bのスレッド実行優先順位判定処理は終了する。
This schedule change requires temporary suspension of non-functional safety requirements and priority execution of abnormalities in functional safety requirements. This request is realized by requesting the inter-core control
一方、制御演算部11は、S170で機能安全要件の異常検出でない、或いは機能安全要件の異常処置待ちでないと判定した場合には、S190へ移行する。S190では、機能安全の安全機構について、全て正常判定時のスケジュールを選択し、コア間制御スレッド制御部32へスレッド群の実行制御を要求する。つまり、異常が発生していない場合、或いは、異常発生後の処置が終了した場合には、後述する実行優先順位テーブルのうちの、正常時に対応するテーブルである、正常時Nが選択される。
On the other hand, if the
続いて、S200で、制御演算部11は、非機能安全要件の異常を検出し、異常処置待ちであるか否かを判定する。制御演算部11は、S200で非機能安全要件の異常を検出していない、或いは非機能安全要件の異常処置待ちでないと判定した場合には、S210へ移行する。
Subsequently, in S200, the
S210では、制御演算部11は、非機能安全要件の処理をコア間制御スレッド制御部32へスレッド群の実行制御を要求し、基本機能(例えば、前述した本来機能に相当)の処理継続を担保する。この際、処理順序は機能安全のスレッドの異常を検知していない場合と同様であるため、商品性の低下がない。S210の後、図4A及び図4Bのスレッド実行優先順位判定処理は終了する。
In S210, the
一方、制御演算部11は、S200で非機能安全要件の異常を検出し、異常処置待ちであると判定した場合には、S220へ移行し、非機能安全要件の異常処置についてコア間制御スレッド制御部32へスレッド群の実行制御を要求する。その後、図4A及び図4Bのスレッド実行優先順位判定処理は終了する。
On the other hand, if the
[3-2-3.優先順位ルール]
ここで、優先順位ルールについて図5を用いて説明する。優先順位ルールは、機能要件部33及び非機能要件部34が図4A及び図4Bのスレッド実行優先順位判定処理で選択可能な複数のスケジュールと、スケジュール毎に各スレッドの実行優先順位との対応関係を示す。スケジュールについては、以下、スレッド実行優先順位テーブル、或いは単にテーブルともいう。[3-2-3. Priority rules]
Here, the priority order rules will be explained using FIG. 5. The priority rule is a correspondence relationship between a plurality of schedules that the
複数のテーブルとして、例えば、正常時N、異常時AN、FTTI優先書き替えAN[1]、ASIL優先書き替えAN[2]が準備されている。これらのテーブルでは、初期診断スレッド、ソフトウェアマスカブルなハードウェア割り込みスレッド、実行周期割り込みスレッドの順で実行されるように実行優先順位が記載されている点が共通する。しかし、実行周期割り込みスレッド内には複数のスレッドが対応付けられており、実行周期割り込みスレッド内の各スレッドの実行優先順位がテーブル毎に異なるように設定される。 As a plurality of tables, for example, normal state N, abnormal state AN, FTTI priority rewriting AN[1], and ASIL priority rewriting AN[2] are prepared. These tables have in common that the execution priorities are listed so that the initial diagnosis thread, the software maskable hardware interrupt thread, and the execution period interrupt thread are executed in this order. However, a plurality of threads are associated with each execution cycle interrupt thread, and the execution priority of each thread within the execution cycle interrupt thread is set to be different for each table.
例えば、機能安全スレッドに異常がない正常時には、「正常時N」と表記されたテーブルが選択される。このテーブルでは、アプリケーションスレッド層の非機能安全要件が対応付けられた、非機能安全スレッド01,02の優先順位が、機能安全要件が対応付けられた、機能安全スレッドm1,n1,n2の優先順位よりも高く設定される。 For example, when the functional safety thread is normal and there is no abnormality, the table labeled "Normal time N" is selected. In this table, the priorities of non-functional safety threads 01 and 02, which are associated with non-functional safety requirements of the application thread layer, are the priorities of functional safety threads m1, n1, and n2, which are associated with functional safety requirements. is set higher than.
また、機能安全スレッドに異常がある場合には、例えば、「異常時AN」と表記されたテーブルが選択される。このテーブルでは、機能安全スレッドm1,n1,n2の優先順位が非機能安全スレッド01,02の優先順位よりも高く設定される。 Further, if there is an abnormality in the functional safety thread, for example, a table labeled "AN at abnormality" is selected. In this table, the priorities of the functionally safe threads m1, n1, and n2 are set higher than the priorities of the non-functionally safe threads 01, 02.
その他、機能安全スレッドに異常がある場合には、状況に応じて、FTTI優先書き替えAN[1]、ASIL優先書き替えAN[2]が選択されうる。 In addition, if there is an abnormality in the functional safety thread, FTTI priority rewrite AN[1] or ASIL priority rewrite AN[2] may be selected depending on the situation.
なお、優先順位ルールは、任意に書き替え可能であってもよい。例えば、形式的な設計仕様書から自動プログラムを用いて、実行形式のコードをフラッシュメモリに実装することによって、機能仕様書に従いライフサイクルの中で設計変更する可能性のある部分を書き替える仕組みを構築することも可能である。特に、実行待ちスレッド毎のFTTIに応じて、動的に各テーブルを書き換えてもよい。 Note that the priority order rules may be arbitrarily rewritten. For example, by using an automatic program from a formal design specification to implement executable code in flash memory, we can create a system that rewrites parts that may undergo design changes during the lifecycle according to the functional specification. It is also possible to construct. In particular, each table may be dynamically rewritten according to the FTTI of each thread waiting to be executed.
[3-2-4.第1作動例]
図6を用いて本実施形態の構成での第1作動例を説明する。本作動例は、機能安全のSMよりも優先度の高いスレッド01の実行周期内で、SMの処理が全て完了しないスレッドm1とスレッドn1に対して同時に異常検知された場合のスレッド実行手順の一例を示す。第1作動例では、機能安全要件であるFTTIに対する実行残時間を比較し、機能安全上より早く処置すべきスレッドの優先度を上げて処理するスケジューリング例である。[3-2-4. First operation example]
A first example of operation in the configuration of this embodiment will be described using FIG. 6. This operation example is an example of a thread execution procedure when an abnormality is simultaneously detected for thread m1 and thread n1 in which all SM processing is not completed within the execution cycle of thread 01, which has a higher priority than the functional safety SM. shows. The first operation example is a scheduling example in which the remaining execution time with respect to FTTI, which is a functional safety requirement, is compared, and threads that should be processed earlier in terms of functional safety are given higher priority and processed.
つまり、制御演算部11は、機能安全スレッドの異常が検知された場合、FTTI内は、機能安全スレッドの実行優先順位を非機能安全スレッドの実行優先順位よりも相対的に高くするようにスケジュールの変更を行う。この際、優先的に実行される機能安全スレッド(すなわち割込スレッド)は、限界待ち時間がFTTI未満になるようなテーブルが選択される。
In other words, when an abnormality in the functional safety thread is detected, the
なお、図6では、3つのスレッドのタイマ割り込みが同期したタイミングを矢印で図示している。このように、3つのスレッドが実行待ち状態である場合は、最も、優先度が高いスレッドから実行される。 Note that in FIG. 6, arrows indicate timings at which the timer interrupts of the three threads are synchronized. In this way, when three threads are waiting for execution, the thread with the highest priority is executed first.
前述したテーブルとしては、FTTI優先書き替えAN[1]が選択されている。なお、各スレッドのランタイムがそれぞれ対応する待ち時間タイマ(すなわち本開示での限界待ち時間)を超過した場合は縮退処理を実行するように設定される。 As the table mentioned above, FTTI priority rewriting AN[1] is selected. Note that if the runtime of each thread exceeds its corresponding waiting time timer (that is, the limit waiting time in the present disclosure), the degeneracy process is set to be executed.
スレッド01の実行後、スレッドm1及びスレッドn1で異常が検知される。この際、実行優先順位に変更がない場合、図6の点線にて示すように、スレッド01,m1,n1の順で実行される。何らかの原因で、先に実行するスレッド01が延長したことを想定すると、スレッドm1,n1にて異常処置(すなわち割込スレッド)を実施し、それぞれにFTTIが設定されている場合、このスレッドの順序では、スレッドn1がFTTIの要件を満たさない。 After execution of thread 01, an abnormality is detected in thread m1 and thread n1. At this time, if there is no change in the execution priority, the threads are executed in the order of threads 01, m1, and n1, as shown by the dotted line in FIG. Assuming that thread 01, which is executed first, is extended for some reason, if threads m1 and n1 perform abnormal handling (i.e. interrupt threads) and FTTI is set for each, the order of this thread will be changed. In this case, thread n1 does not meet the requirements of FTTI.
そこで、スレッド01は、スレッドm1とスレッドn1が異常を検知した場合は、スレッドm1及びスレッドn1よりも実行優先順位がスケジューラにより下げられる。なお、スレッド01は、機能安全の異常検知機能(SM)の正常時において、スレッドm1及びスレッドn1よりも、実行優先順位が高く設定されている。 Therefore, when the thread m1 and the thread n1 detect an abnormality, the execution priority of the thread 01 is lowered by the scheduler than the thread m1 and the thread n1. Note that the thread 01 is set to have a higher execution priority than the thread m1 and the thread n1 when the functional safety abnormality detection function (SM) is normal.
この結果、図6の実線にて示すように、スレッド01に対して、スレッドn1、スレッドm1の順に処理が可能となり、スレッド01の実行は、スレッドn1、スレッドm1の規定の異常処置が完了するまで遅延される。つまり、スレッド01の実行は、スケジュールで規定された異常処置のスレッドを完了するまで遅延され、所定のスケジュール内でのスレッドの異常処置が完了後、スレッド01の実行に移る。この際、必ずしも、全ての異常処置が完了するまでスレッド01の実行が遅延されるわけではない。なお、スレッド01は、通常のデッドライン監視タイマを超過しないようにスケジューリングされることが好ましい。 As a result, as shown by the solid line in FIG. 6, thread n1 and thread m1 can be processed in the order of thread 01, and the specified abnormality handling of thread n1 and thread m1 is completed. will be delayed until In other words, the execution of thread 01 is delayed until the abnormality handling thread specified in the schedule is completed, and after the abnormality handling of the thread within the predetermined schedule is completed, the execution of thread 01 is started. At this time, the execution of thread 01 is not necessarily delayed until all the abnormalities are completed. Note that it is preferable that thread 01 be scheduled so as not to exceed the normal deadline monitoring timer.
[3-2-5.第2作動例]
第1作動例では、機能安全要件も非機能安全要件も同一のスケジューラの管理下で各関連スレッドが制御される前提で記載している。つまり、主としてコア間制御スレッド制御部32が備えるスケジューラの機能を用いて、スレッドの実行順序を管理している。しかし、図7の第2作動例に示すように、非機能安全要件に関連したスレッドを制御するスケジューラと、機能安全要件に関連したスレッドを制御するスケジューラとを独立させてもよい。つまり、機能要件部33のスケジューラの機能及び非機能要件部34のスケジューラの機能をそれぞれ用いて、コア間制御スレッド制御部32がこれらを調停することで、スレッドの実行順序を管理している。[3-2-5. Second operation example]
In the first operation example, both functional safety requirements and non-functional safety requirements are described on the assumption that each related thread is controlled under the management of the same scheduler. That is, the thread execution order is managed mainly by using the scheduler function provided in the inter-core control
この構成では、個々のスケジューラの管理下で、全ての機能安全要件に関連するスレッドを集約し、機能安全の安全機構の実行をいかなる排他的侵害要因からも保護し安全を担保するように構成することができる。この場合、スケジューラを含むコア間制御スレッド制御部32は、最高ASILの機能安全要件として構成することが望ましい。
In this configuration, threads related to all functional safety requirements are aggregated under the management of each scheduler, and the execution of the functional safety safety mechanism is configured to be protected from any exclusive infringement factors and ensure safety. be able to. In this case, it is desirable that the inter-core control
このような構成にした場合は、非機能安全要件と機能安全要件が無干渉になることが、設計構造的に担保される。このため、機能安全要件内の各スレッドのASILの違いや、FTTIのランタイム上の優先度のみにフォーカスして、マルチスレッドのリソーセスを適切にディスパッチすることがより容易に構造設計可能となる。 With such a configuration, non-functional safety requirements and functional safety requirements are guaranteed to have no interference from a design structure. Therefore, it becomes easier to design a structure to appropriately dispatch multi-threaded resources by focusing only on the ASIL difference of each thread in the functional safety requirements and the priority on the FTTI runtime.
換言すれば、機能安全要件と非機能安全要件が確実にパーテショニングされ、ソフトウェアの再利用性が高くなる。この結果、ソフトウェアライフサイクルにおける機能安全に適合するためのアーキテクチャ変更及び検証工数の節約と実装したソフトウェアのロバスト性の向上の両立を図ることができる。なお、マルチスレッドのリソーセスには、例えば、メモリ13、スケジュール、入出力部12が該当する。
In other words, functional safety requirements and non-functional safety requirements are reliably partitioned, increasing software reusability. As a result, it is possible to achieve both savings in architectural changes and verification man-hours required to comply with functional safety in the software life cycle, and improvement in the robustness of the implemented software. Note that the multi-thread resources include, for example, the
また、第2作動例の構成は、例えば下記のように設計される。 Further, the configuration of the second operation example is designed as follows, for example.
各種機能安全要件のFTTIを担保するために、最大割り込み許容間隔(すなわち、最も遅れて処理してもFTTIは担保できる間隔)から、集約した機能安全関連スレッド群の最小割り込み周期をスケジューリングする。例えば、2,4,8,16msの周期的スレッドを集約した場合、2msを一般OSから独立したタイマ割り込みとして設計する。 In order to guarantee FTTI for various functional safety requirements, the minimum interrupt cycle of the aggregated group of functional safety-related threads is scheduled based on the maximum allowable interrupt interval (that is, the interval that can guarantee FTTI even if the processing is delayed the most). For example, when periodic threads of 2, 4, 8, and 16 ms are aggregated, 2 ms is designed as a timer interrupt independent from the general OS.
非機能安全要件関連のスレッド内での割り込み禁止時間は、余裕をとって2msより十分小さくし、2ms周期割り込みを担保する設計とする。 The interrupt prohibition time in threads related to non-functional safety requirements is designed to be sufficiently shorter than 2 ms to ensure a 2 ms cycle interrupt.
[3-2-6.正常時スケジューラ実行処理]
制御演算部11が実行する正常時スケジューラ実行処理について、図8A及び図8Bのフローチャートを用いて説明する。正常時スケジューラ実行処理は、機能安全スレッドの異常が発生していない状況での正常時Nのテーブルに従って実行される処理である。正常時スケジューラ実行処理は、例えば、予め設定された周期毎に実施される。[3-2-6. Normal scheduler execution processing]
The normal scheduler execution process executed by the
正常時スケジューラ実行処理では、まず、S310で、制御演算部11は、実行周期割り込み、ここでは、(最小時間間隔)X(2の0乗)の実行待ちであるか否かを判定する。制御演算部11は、S310で実行周期割り込みの実行待ちでないと判定した場合には、S410へ移行する。
In the normal scheduler execution process, first, in S310, the
一方、制御演算部11は、S310で実行周期割り込み(最小時間間隔)X(2の0乗)の実行待ちであると判定した場合には、S320へ移行し、非機能安全スレッド01の実行待ちであるか否かを判定する。
On the other hand, if it is determined in S310 that the
例えば、制御演算部11は、S320で非機能安全スレッド01の実行待ちであると判定した場合には、S330へ移行し、非機能安全スレッド01をディスパッチして当スレッドを実行するためのカーネルコールを実行する。この際、当スレッドより優先度の低いスレッドが実行中であっても、そのスレッドを一時中断(すなわちプリエンプション)して当スレッドの実行を優先する。その後、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
For example, if the
一方、制御演算部11は、S320で非機能安全スレッド01の実行待ちでないと判定した場合には、S340へ移行し、非機能安全スレッド02の実行待ちであるか否かを判定する。
On the other hand, if the
制御演算部11は、S340で非機能安全スレッド02の実行待ちであると判定した場合には、S350へ移行し、非機能安全スレッド02をディスパッチして当スレッドを実行するためのカーネルコールを実行する。一方、制御演算部11は、S340で非機能安全スレッド02の実行待ちでないと判定した場合には、S410に移行する。
If the
続いてS410で、制御演算部11は、実行周期割り込み(最小時間間隔)X(2のm乗)の実行待ちであるか否かを判定する。制御演算部11は、S410で実行周期割り込みの実行待ちでないと判定した場合には、S510へ移行する。
Subsequently, in S410, the
一方、制御演算部11は、S410で実行周期割り込みの実行待ちであると判定した場合には、S420へ移行し、機能安全スレッドm1の実行待ちであるか否かを判定する。
On the other hand, if it is determined in S410 that the
制御演算部11は、S420で機能安全スレッドm1の実行待ちであると判定した場合には、S430へ移行し、機能安全スレッドm1をディスパッチして当スレッドを実行するためのカーネルコールを実行する。その後、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
When the
一方、制御演算部11は、S420で機能安全スレッドm1の実行待ちでないと判定した場合には、S510に移行する。
On the other hand, if the
制御演算部11は、S510で実行周期割り込み(最小時間間隔)X(2のn乗)の実行待ちであるか否かを判定する。制御演算部11は、S510で実行周期割り込みの実行待ちでないと判定した場合には、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
In S510, the
一方、制御演算部11は、S510で実行周期割り込みの実行待ちかであると判定した場合には、S520へ移行し、機能安全スレッドn1の実行待ちであるか否かを判定する。
On the other hand, if the
制御演算部11は、S520で機能安全スレッドn1の実行待ちであると判定した場合には、S530へ移行し、機能安全スレッドn1をディスパッチして当スレッドを実行するためのカーネルコールを実行する。この際、当スレッドより優先度の低いスレッドが実行中でも、一時中断して当スレッドの実行を優先する。その後、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
When the
一方、制御演算部11は、S520で機能安全スレッドn1の実行待ちでないと判定した場合には、S540へ移行し、機能安全スレッドn2の実行待ちであるか否かを判定する。
On the other hand, if the
制御演算部11は、S540で機能安全スレッドn2の実行待ちであると判定した場合には、S550へ移行し、機能安全スレッドn2をディスパッチして当スレッドを実行するためのカーネルコールを実行する。その後、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
When the
一方、制御演算部11は、S540で機能安全スレッドn2の実行待ちでないと判定した場合には、図8A及び図8Bの正常時スケジューラ実行処理を終了する。
On the other hand, if the
[3-2-7.異常時スケジューラ実行処理]
制御演算部11が実行する異常時スケジューラ実行処理について、図9A、図9B、図10A、図10B、図11A、及び図11B(以下、図9A~図11B)のフローチャートを用いて説明する。図9A~図11Bに示す異常時スケジューラ実行処理では、優先順位ルールに従って、正常時スケジューラ実行処理とはスレッドの実行順序が異なるように変更されている。なお、図10A及び図10Bに示す異常時スケジューラAN[1]の実行処理は、FTTI優先書き替えAN[1]が選択された場合の処理に該当する。また、図11A及び図11Bに示す異常時スケジューラAN[2]の実行処理は、ASIL優先書き替えAN[2]が選択された場合の処理に該当する。換言すれば、図10A及び図10Bに示す異常時スケジューラAN[1]及び図11A及び図11Bに示す異常時スケジューラAN[2]は、図5で示した「スケジューラ選択テーブル」にそれぞれ該当する。[3-2-7. Scheduler execution process in case of abnormality]
The abnormal scheduler execution process executed by the
図9A及び図9Bに示す異常時スケジューラANの実行処理では、S410~S550の処理が、S310~S350の処理よりも前に実行される。図10A及び図10Bに示す異常時スケジューラAN[1]の実行処理では、まず、S510の処理が実施され、その後、S540~S550、S520~S530、S410~S430、S310~S350の順に処理が実施される。 In the execution processing of the abnormal scheduler AN shown in FIGS. 9A and 9B, the processing from S410 to S550 is executed before the processing from S310 to S350. In the execution process of the abnormality scheduler AN[1] shown in FIGS. 10A and 10B, first, the process of S510 is executed, and then the processes of S540 to S550, S520 to S530, S410 to S430, and S310 to S350 are executed in this order. be done.
図11A及び図11Bに示す異常時スケジューラAN[2]の実行処理では、S510~S550、S410~S430、S310~S350の順に処理が実施される。 In the execution process of the abnormality scheduler AN[2] shown in FIGS. 11A and 11B, the processes are executed in the order of S510 to S550, S410 to S430, and S310 to S350.
[3-3.効果]
以上詳述した第1実施形態によれば、以下の効果を奏する。[3-3. effect]
According to the first embodiment described in detail above, the following effects are achieved.
(3a)本開示の一態様は、機能安全スレッド、及び少なくとも1つの非機能安全スレッド、を予めスケジューラで定義された優先順位に基づく並列処理で実行可能な車両用コンピュータ(例えば制御演算部11)にて実行される自動車用コンピュータの制御方法である。並列処理には、マルチコアによる並列処理を含むスケジューリング、あるコアによる時分割による疑似並列処理が含まれうる。機能安全スレッドは、車両の安全に関する値を演算するスレッドを表す。また、非機能安全スレッドは、機能安全スレッドを除くスレッドを表す。 (3a) One aspect of the present disclosure is a vehicle computer (for example, a control calculation unit 11) capable of executing a functional safety thread and at least one non-functional safety thread in parallel processing based on priorities defined in advance by a scheduler. This is a method for controlling an automobile computer executed in a car. Parallel processing may include scheduling including parallel processing using multiple cores, and pseudo-parallel processing using time sharing using a certain core. The functional safety thread represents a thread that calculates values related to vehicle safety. Furthermore, non-functionally safe threads refer to threads other than functionally safe threads.
自動車用コンピュータの制御方法では、機能安全スレッドの異常を検知し、機能安全スレッドの異常が検知された場合に、スケジューラを変更してスレッドの実行優先順位を変更する。 In a method for controlling an automobile computer, an abnormality in a functional safety thread is detected, and when an abnormality in the functional safety thread is detected, the scheduler is changed to change the execution priority of the thread.
このような制御方法によれば、機能安全スレッドに異常が生じた場合だけ、スレッドを実行する際の優先順位を変更できる。よって、機能安全スレッドが正常判定している間は、車両の本来機能を優先したスケジューリングが可能となる。 According to such a control method, the priority order for thread execution can be changed only when an abnormality occurs in the functional safety thread. Therefore, while the functional safety thread is determining normality, scheduling that prioritizes the original functions of the vehicle is possible.
つまり、優先順位が変更される状況を、機能安全スレッドに異常が生じた場合に限定するので、全てのスレッドが限界待ち時間内に実行されやすくする様なスケジュール設計が容易となる。 In other words, the situation in which the priority order is changed is limited to when an abnormality occurs in a functional safety thread, making it easy to design a schedule in which all threads are likely to be executed within the waiting time limit.
より詳細には、スレッドの実行優先順位を制御する構成によれば、相対的にスケジューラの優先順位テーブルの書替えを実施する。このため、前述した安全機構が異常を検出して異常処置を実行するスレッドが他のスレッドが実行中のため実行待ちになっていても、両スレッドの相対的実行優先順位を変更して、機能安全の安全を担保する許容時間内に確実に処理を完了できる。かつ、非機能安全スレッドについても本来機能を縮退させる機会を極力減らすことができる。 More specifically, according to the configuration that controls the execution priority of threads, the priority table of the scheduler is relatively rewritten. Therefore, even if the safety mechanism described above detects an abnormality and the thread that executes the abnormality action is waiting for execution because another thread is running, the relative execution priority of both threads is changed and the thread is able to function. Processing can be completed reliably within the allowable time that ensures safety. In addition, it is possible to reduce as much as possible the chances of degenerating the original functions of non-functionally safe threads.
すなわち、本願構成では、機能安全スレッドが異常を検出した場合に、規定の機能安全要件を最優先に処理したうえで、異常原因と直接関係しない本来機能(非機能安全要件)は、極力縮退を回避することができる。また、リアルタイム性を確保したスケジュール設計を実現できる。 In other words, in the present configuration, when the functional safety thread detects an abnormality, the prescribed functional safety requirements are processed with the highest priority, and the original functions (non-functional safety requirements) that are not directly related to the cause of the abnormality are degenerated as much as possible. can be avoided. In addition, it is possible to realize schedule design that ensures real-time performance.
なお、機能安全スレッドでは、例えば、機能安全要求仕様を実現してもよい。この場合の本来機能と安全機構をソフトウェアモジュールにして半導体メモリ内に実装した際の実行優先順位を定義する最小実行単位であり、スケジューラにより、一般的には、使用するコアやメモリ及び入出力等ハードウェア資源が時分割で紐付けられる。なお、機能安全要求仕様とは、安全目標や安全機構(例えば、フェールセーフ機構やFTTI)が技術安全要求(TSR:Technical Safety Requirement)や技術安全コンセプト(TSC:Technical Safety Concept)により一般的には定義されてもよい。なお、TSRは、システムの異常が発生した時に安全担保のため、どのような安全保護機能が必要かを要求するための技術仕様書である。また、TSCは、その安全保護機能をいかに実現するかを技術仕様書としてまとめたものである。 Note that the functional safety thread may implement, for example, functional safety requirement specifications. In this case, it is the minimum execution unit that defines the execution priority when the original functions and safety mechanisms are implemented as software modules in semiconductor memory. Hardware resources are linked in a time-sharing manner. Functional safety requirements specifications generally refer to safety objectives and safety mechanisms (for example, fail-safe mechanisms and FTTI) that are defined by technical safety requirements (TSR) and technical safety concepts (TSC). may be defined. Note that the TSR is a technical specification that requests what safety protection functions are required to ensure safety when a system abnormality occurs. Furthermore, the TSC is a technical specification that describes how to realize the safety protection functions.
(3b)本開示の一態様では、異常が検知された場合、予め設定された異常処置が完了するまで、非機能安全スレッドの実行を中断するように構成される。非機能安全スレッドの実行は、動的スケジューラで更新された期間のみ実行する関連スレッドの優先順位がカーネルにより制御される、実行すべき機能安全スレッド、或いは異常時に実施される割込スレッドの実行が完了するまで中断される。なお、非機能安全スレッドの実行は、全ての異常処置が完了するまで非機能安全スレッドを中断するのではない。 (3b) In one aspect of the present disclosure, when an abnormality is detected, execution of the non-functional safety thread is suspended until a preset abnormality treatment is completed. The execution of non-functionally safe threads is controlled by the kernel, with the priority of related threads being executed only during the period updated by the dynamic scheduler, or the execution of functionally safe threads that should be executed, or interrupt threads that are executed at abnormal times. Suspended until completed. Note that execution of the non-functionally safe thread does not suspend the non-functionally safe thread until all abnormal handling is completed.
このような方法によれば、異常処置が完了するまで非機能安全スレッドの実行を中断するので、規定の異常処置を最優先で実行し、規定の異常処置が完了後は、中断した非機能安全スレッドの実行に戻ることが可能である。 According to this method, the execution of the non-functional safety thread is suspended until the abnormality handling is completed, so the prescribed abnormality handling is executed with the highest priority, and after the prescribed abnormality handling is completed, the suspended non-functional safety thread is It is possible to return to thread execution.
(3c)本開示の一態様では、異常が検知されてから車両に危険事象が発生するまでの推定時間をFTTI(Fault Tolelant Time Interval)とする。異常が検知された場合、FTTI内は、機能安全スレッドの実行優先順位を非機能安全スレッドの実行優先順位よりも相対的に高くするようにスケジュールの変更を実施する。 (3c) In one aspect of the present disclosure, the estimated time from when an abnormality is detected until a dangerous event occurs in a vehicle is referred to as FTTI (Fault Tolerant Time Interval). When an abnormality is detected, the FTTI changes the schedule so that the execution priority of the functional safety thread is relatively higher than the execution priority of the non-functional safety thread.
このような方法によれば、FTTIを考慮して非機能安全スレッドを一時的に中断することができる。 According to such a method, a non-functionally safe thread can be temporarily suspended in consideration of FTTI.
(3d)本開示の一態様では、カーネルの割り込み制御を使用し、機能安全スレッドの異常の有無を検出して、異常が検知された場合に、スケジュールを変更する。 (3d) In one aspect of the present disclosure, kernel interrupt control is used to detect whether or not there is an abnormality in the functional safety thread, and if an abnormality is detected, the schedule is changed.
このような方法によれば、カーネル割り込み制御を実施するので、早急に異常に対処することができる。 According to such a method, since kernel interrupt control is implemented, it is possible to promptly deal with an abnormality.
(3e)本開示の一態様では、機能安全スレッドの異常が検出されているか否かを診断する機能安全機構(SM)をスレッドとして実装し、異常が検出されているか否かに応じてスケジューラの変更の要否を判定し、スケジューラの切り替えを行う。 (3e) In one aspect of the present disclosure, a functional safety mechanism (SM) that diagnoses whether or not an abnormality in a functional safety thread is detected is implemented as a thread, and a scheduler is activated depending on whether or not an abnormality is detected. Determine whether a change is necessary and switch the scheduler.
このような方法によれば、スケジューラの変更の要否を判定して、スケジューラの変更が必要な場合にスケジューラの切り替えを行うことができる。なお、スケジューラの切り替えの要否判定は、スケジューラの切り替えが間に合う適切なタイミングで実施されるとよい。 According to such a method, it is possible to determine whether or not to change the scheduler, and to switch the scheduler when it is necessary to change the scheduler. Note that the determination of whether or not the scheduler needs to be switched is preferably performed at an appropriate timing that allows the scheduler to be switched in time.
また、スケジューラ切替の主な制御方法として図5で示すように、機能安全常時SMを全ての周期的割り込みに配置する方法(例えば、最短周期割り込みに配置)を採用できる。或いは、HW割り込みハンドラで機能安全SMを起床させる構造とする方法を採用できる。 Further, as a main control method for scheduler switching, as shown in FIG. 5, a method of arranging functional safety constant SMs for all periodic interrupts (for example, arranging them for the shortest periodic interrupt) can be adopted. Alternatively, a method can be adopted in which the functional safety SM is woken up by a HW interrupt handler.
(3f)本開示の一態様では、少なくともカーネルの割り込み制御にて実施される割込スレッドには、実行すべき指示を受けてから当該スレッドが実行されるまでの時間の上限を表す限界待ち時間が設定される。割込スレッドの限界待ち時間は、FTTI未満になるように設定される。 (3f) In one aspect of the present disclosure, at least an interrupt thread implemented under kernel interrupt control has a waiting time limit that represents the upper limit of the time from receiving an instruction to be executed until the thread is executed. is set. The interrupt thread limit latency is set to be less than the FTTI.
このような方法によれば、FTTIまでに割込スレッドが実行することができるので、より安全に割込スレッドを実行することができる。 According to such a method, the interrupt thread can be executed before the FTTI, so the interrupt thread can be executed more safely.
(3g)本開示の一態様では、割込スレッド、機能安全スレッド、及び非機能安全スレッドには、実行すべき指示を受けてから当該スレッドが実行されるまでの時間の上限を表す限界待ち時間が設定されている。割込スレッドが実行されるまで(Twait_SRを超過する前)に、割込スレッド以外の他のスレッドの限界待ち時間(Twait_NSR)が超過した場合、当該他のスレッドに対応するシステムを縮退させる。システムの縮退では、例えば、本来機能の一部を制限する制限モード、自動運転のシステム異常時であれば、運転者による手動運転を要求する交替制御モード等が実施されうる。 (3g) In one aspect of the present disclosure, the interrupt thread, the functionally safe thread, and the non-functionally safe thread have a waiting time limit that represents the upper limit of the time from when the thread receives an instruction to be executed until the thread is executed. is set. If the waiting time limit (Twait_NSR) of a thread other than the interrupt thread exceeds before the interrupt thread is executed (before Twait_SR is exceeded), the system corresponding to the other thread is degraded. When the system is degenerated, for example, a restriction mode that restricts some of the original functions, a shift control mode that requests manual operation by the driver, etc. may be implemented when an automatic driving system abnormality occurs.
このような方法によれば、非機能安全スレッド等の他のスレッドが限界待ち時間以内に実行できない場合に、他のスレッドに対応するシステムを縮退させるので、より安全と利便を両立して車両を制御することができる。 According to this method, when other threads such as non-functionally safe threads cannot be executed within the waiting time limit, the system corresponding to the other threads is degraded, so that the vehicle can be operated more safely and conveniently. can be controlled.
(3h)本開示の一態様では、複数の機能安全スレッドにおいて異常を検知してもよい。異常を検知したスレッド毎に、割込スレッドを実行し、この際、限界待ち時間に対する残り時間が小さい順に、割込スレッドの実行優先順位を高するように(すなわち、割込スレッドの実行優先順位がより高くなるように)スケジューラの内容を変更する。 (3h) In one aspect of the present disclosure, an abnormality may be detected in a plurality of functional safety threads. An interrupt thread is executed for each thread that detects an abnormality, and at this time, the execution priority of the interrupt thread is increased in descending order of the remaining time relative to the limit waiting time (i.e., the execution priority of the interrupt thread is change the contents of the scheduler so that it is higher.
このような方法によれば、複数の機能安全スレッドにおいて異常が検知されたことに伴い、複数の割込スレッドを実行する場合に、限界待ち時間に対する残り時間が小さい順に割込スレッドを実行できる。よって、割込スレッドの何れかが限界待ち時間以内に実行されない事態になることを抑制することができる。 According to such a method, when a plurality of interrupt threads are executed in response to detection of an abnormality in a plurality of functional safety threads, the interrupt threads can be executed in descending order of remaining time relative to the limit waiting time. Therefore, it is possible to prevent a situation in which any of the interrupt threads is not executed within the waiting time limit.
(3i)本開示の一態様は、少なくとも1つの機能安全スレッド、及び少なくとも1つの非機能安全スレッド、を予めスケジューラで定義された優先順位に基づく並列処理で実行可能な車両用電子制御装置(本開示での制御演算部11)である。 (3i) One aspect of the present disclosure provides a vehicle electronic control device (this invention) capable of executing at least one functional safety thread and at least one non-functional safety thread in parallel processing based on priorities defined in advance by a scheduler. This is the control calculation unit 11) in the disclosure.
異常検知部は、機能安全スレッドの異常を検知するように構成される。順序変更部は、機能安全スレッドで異常が検知され、異常処置が必要になった場合に、スケジューラを変更して優先順位を変更する。 The abnormality detection unit is configured to detect an abnormality in the functional safety thread. The order change unit changes the scheduler and changes the priority order when an abnormality is detected in the functional safety thread and abnormality treatment is required.
このような構成によれば、機能安全スレッドに異常が生じた場合だけ、スレッドを実行する際の優先順位を変更できる。 According to such a configuration, the priority order for thread execution can be changed only when an abnormality occurs in the functional safety thread.
(3j)特に、車両用電子制御装置は、コアを複数個実装して、スレッドがコアやメモリ等ハードウェア資源をスケジューラにより時分割で共有するシステムを構成できる。このようなシステムにおいては、機能安全スレッドの安全機構が異常を検出した際、他のスレッドの実行を一時中断して、システム許容時間内に異常処置を完了したり、時間的に余裕のあるコアやメモリの資源を優先的に使用したりすることが可能となる。 (3j) In particular, a vehicle electronic control device can configure a system in which a plurality of cores are implemented and threads share hardware resources such as cores and memory in a time-sharing manner using a scheduler. In such systems, when the safety mechanism of the functional safety thread detects an abnormality, it is possible to temporarily suspend execution of other threads and complete the abnormality treatment within the system allowable time, or to use a core with sufficient time. It becomes possible to preferentially use memory resources.
このような構成によれば、システム全体として実行時間がクリティカルになる、つまり、スレッドが許容時間内に終了しない状況が頻発する、という潜在的なケースをより減らすことがき、ロバスト性の高いシステムが構築可能となる。また、システム全体の安全担保に関して、実行時間の余裕のあるシステム設計により、システム機能の縮退設計の必要性を削減し、システム本来の機能を確保することにより、商品性を向上することが容易となる。 According to such a configuration, it is possible to further reduce the potential cases in which the execution time becomes critical for the system as a whole, that is, situations in which threads do not finish within the permissible time frequently occur, and a highly robust system can be achieved. It becomes possible to construct. In addition, with regard to ensuring the safety of the entire system, by designing a system with sufficient execution time, it is easy to improve marketability by reducing the need for degenerate design of system functions and ensuring the original functions of the system. Become.
[4.他の実施形態]
以上、本開示の実施形態について説明したが、本開示は前述の実施形態に限定されることなく、種々変形して実施することができる。[4. Other embodiments]
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments and can be implemented with various modifications.
(4a)上記実施形態では、機能安全スレッド毎にFTTIが対応付けられたが、これに限定されるものではない。例えば、FTTIに換えて、或いはFTTIに加えて、機能安全スレッド毎に自動車安全水準レベル(ASIL:Automotive Safety Integrity Level)が対応付けられていてもよい。この場合、複数の機能安全スレッドにおいて異常を検知し、異常を検知したスレッド毎に、割込スレッドを実行し、この際、自動車安全水準レベルが高い順に、割込スレッドの実行優先順位を高する様にスケジューラの内容を変更してもよい。例えば、制御演算部11は、自動車安全水準レベルが高い順に各スレッドが実行されるように図5に示す異常時スケジューラAN[2]を動的に書き換えるとよい。
(4a) In the above embodiment, an FTTI is associated with each functional safety thread, but the present invention is not limited to this. For example, instead of or in addition to FTTI, each functional safety thread may be associated with an Automotive Safety Integrity Level (ASIL). In this case, an abnormality is detected in multiple functional safety threads, and an interrupt thread is executed for each thread that detects the abnormality. At this time, the execution priority of the interrupt thread is increased in descending order of automotive safety level. You may change the contents of the scheduler as shown below. For example, the
このような方法によれば、自動車安全水準レベルが高い順に、スレッドを実行するので、より優先して実行すべきスレッドを優先して実行することができる。 According to this method, threads are executed in descending order of vehicle safety level, so threads that should be executed with higher priority can be executed with priority.
(4b)上記実施形態では、ECU10を構成する各構成要素11,12,13,16の配置について言及していないが、例えば、各構成要素11,12,13,16の実際のデバイスは、1つ又は複数のSOC(System On Chip)で構成することができる。
(4b) Although the above embodiment does not mention the arrangement of each
また、例えば、図2に示す車両アプリケーション機能16の各機能は、破線部31内の機能がOSを実装する1つのSOCによって実現され、破線部31外の機能が前記SOCとは別のSOCによって実現されてもよい。すなわち、コア間制御スレッド制御部32、及び機能要件部33の機能がOSを実装する1つのSOCで実現され、非機能要件部34の機能が前記SOCとは別のSOCで実現されてもよい。
Further, for example, in each function of the
このような構成によれば、オーバーヘッドを減少させ、リアルタイム性を向上させることができる。 According to such a configuration, overhead can be reduced and real-time performance can be improved.
(4c)本開示に記載の制御演算部11及びその手法は、コンピュータプログラムにより具体化された1つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリを構成することによって提供された専用コンピュータにより、実現されてもよい。あるいは、本開示に記載の制御演算部11及びその手法は、1つ以上の専用ハードウェア論理回路によってプロセッサを構成することによって提供された専用コンピュータにより、実現されてもよい。もしくは、本開示に記載の制御演算部11及びその手法は、1つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリと1つ以上のハードウェア論理回路によって構成されたプロセッサとの組み合わせにより構成された1つ以上の専用コンピュータにより、実現されてもよい。また、コンピュータプログラムは、コンピュータにより実行されるインストラクションとして、コンピュータ読み取り可能な非遷移有形記録媒体に記憶されてもよい。制御演算部11に含まれる各部の機能を実現する手法には、必ずしもソフトウェアが含まれている必要はなく、その全部の機能が、1つあるいは複数のハードウェアを用いて実現されてもよい。
(4c) The
(4d)上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。 (4d) A plurality of functions of one component in the above embodiment may be realized by a plurality of components, and a function of one component may be realized by a plurality of components. . Further, a plurality of functions possessed by a plurality of constituent elements may be realized by one constituent element, or one function realized by a plurality of constituent elements may be realized by one constituent element. Further, a part of the configuration of the above embodiment may be omitted. Further, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of other embodiments.
(4e)前述した車両制御システム1の他、当該車両制御システム1の構成要素となる車両制御装置等の装置、当該装置としてコンピュータを機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実体的記録媒体、自動車用コンピュータの制御方法を含む各種方法など、種々の形態で本開示を実現することもできる。
(4e) In addition to the
Claims (11)
前記機能安全スレッドの異常を検知し、
前記機能安全スレッドの異常が検知された場合に、前記スケジューラを変更して前記優先順位を変更する
自動車用コンピュータの制御方法。 At least one functional safety thread representing a thread that calculates values related to vehicle safety, such as acceleration, deceleration, and steering of the vehicle, and at least one non-functional safety thread representing a thread other than the functional safety thread. A method for controlling a vehicle computer executed by a vehicle computer (11) capable of executing parallel processing based on priorities defined by a scheduler, the method comprising:
detecting an abnormality in the functional safety thread;
A method for controlling an automobile computer, comprising changing the priority order by changing the scheduler when an abnormality in the functional safety thread is detected.
前記異常が検知されてから当該車両に危険事象が発生するまでの推定時間をFTTI(Fault Tolelant Time Interval)として、前記異常が検知された場合、前記FTTI内は、前記機能安全スレッドの実行優先順位を前記非機能安全スレッドの実行優先順位よりも相対的に高くするスケジュールの変更を行う
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 1, comprising :
The estimated time from when the abnormality is detected to when a dangerous event occurs in the vehicle is defined as FTTI (Fault Tolerant Time Interval), and when the abnormality is detected, execution priority is given to the functional safety thread within the FTTI. A method for controlling an automobile computer, comprising changing a schedule so that the execution priority of the non-functional safety thread is relatively higher than the execution priority of the non-functional safety thread.
前記異常が検知された場合、予め設定された異常処置が完了するまで、前記非機能安全スレッドの実行を中断する
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 1 or 2, comprising:
A method for controlling an automobile computer, wherein when the abnormality is detected, execution of the non-functional safety thread is suspended until a preset abnormality treatment is completed.
カーネルの割り込み制御を使用し、前記機能安全スレッドの異常の有無を検出して、前記異常が検知された場合に、前記スケジュールを変更する
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 2, comprising:
A method for controlling a computer for an automobile, using kernel interrupt control, detecting whether or not there is an abnormality in the functional safety thread, and changing the schedule when the abnormality is detected.
前記機能安全スレッドの異常が検出されているか否かを診断する機能安全機構をスレッドとして実装し、前記異常が検出されているか否かに応じて前記スケジューラの変更の要否を判定し、前記スケジューラの切り替えを行う
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 4,
A functional safety mechanism for diagnosing whether or not an abnormality in the functional safety thread is detected is implemented as a thread, and depending on whether or not the abnormality is detected, it is determined whether or not to change the scheduler. A method of controlling an automobile computer that performs switching.
少なくとも前記カーネルの割り込み制御にて実施される割込スレッドには、実行すべき指示を受けてから当該スレッドが実行されるまでの時間の上限を表す限界待ち時間が設定されており、
前記割込スレッドの限界待ち時間は、前記FTTI未満になるように設定される
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 4 or 5, comprising:
At least the interrupt thread executed under the interrupt control of the kernel is set with a waiting time limit representing the upper limit of the time from receiving an instruction to be executed until the thread is executed;
The limit waiting time of the interrupt thread is set to be less than the FTTI.
前記割込スレッド、前記機能安全スレッド、及び前記非機能安全スレッドには、前記限界待ち時間が設定されており、
前記割込スレッドが実行されるまでの時間が、前記割込スレッド以外の他のスレッドの限界待ち時間が超過した場合、当該他のスレッドに対応するシステムを縮退させる
自動車用コンピュータの制御方法。 7. A method for controlling an automobile computer according to claim 6,
The interrupt thread, the functional safety thread, and the non-functional safety thread have the waiting time limit set,
A method for controlling an automobile computer, comprising: degenerating a system corresponding to a thread other than the interrupt thread when the time until the interrupt thread is executed exceeds a waiting time limit of a thread other than the interrupt thread.
複数の機能安全スレッドにおいて異常を検知し、
前記異常を検知したスレッド毎に、前記割込スレッドを実行し、この際、限界待ち時間に対する残り時間が小さい順に、前記割込スレッドの実行優先順位を高する様にスケジューラの内容を変更する
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to claim 6 or 7,
Detects abnormalities in multiple functional safety threads,
The interrupt thread is executed for each thread that detects the abnormality, and at this time, the contents of the scheduler are changed so that the execution priority of the interrupt threads is increased in descending order of remaining time relative to the limit waiting time. computer control method.
前記割込スレッド毎に自動車安全水準レベルが対応付けられており、
複数の機能安全スレッドにおいて異常を検知し、
前記異常を検知したスレッド毎に、前記割込スレッドを実行し、この際、前記自動車安全水準レベルが高い順に、前記割込スレッドの実行優先順位を高する様にスケジューラの内容を変更する
自動車用コンピュータの制御方法。 A method for controlling an automobile computer according to any one of claims 6 to 8,
An automobile safety level is associated with each interrupt thread,
Detects abnormalities in multiple functional safety threads,
The interrupt thread is executed for each thread that detects the abnormality, and at this time, the contents of the scheduler are changed so that the execution priority of the interrupt threads is increased in descending order of the vehicle safety level. How to control a computer.
前記機能安全スレッドの異常を検知するように構成された異常検知部(S130,S150,S170)と、
前記機能安全スレッドの異常が検知された場合に、前記スケジューラを変更して前記優先順位を変更する順序変更部(S10,S20,S30,S180)と、を備える
車両用電子制御装置。 At least one functional safety thread representing a thread that calculates values related to vehicle safety, such as acceleration, deceleration, and steering of the vehicle, and at least one non-functional safety thread representing a thread other than the functional safety thread. A vehicle electronic control device (10) capable of executing parallel processing based on priorities defined by a scheduler,
an abnormality detection unit (S130, S150, S170) configured to detect an abnormality in the functional safety thread;
An electronic control device for a vehicle, comprising: an order changing unit (S10, S20, S30, S180) that changes the scheduler and changes the priority order when an abnormality in the functional safety thread is detected.
前記順序変更部は、前記異常が検知されてから当該車両に危険事象が発生するまでの推定時間をFTTI(Fault Tolelant Time Interval)として、前記異常が検知された場合、前記FTTI内は、前記機能安全スレッドの実行優先順位を前記非機能安全スレッドの実行優先順位よりも相対的に高くするスケジュールの変更を行うように構成された
車両用電子制御装置。 A vehicle electronic control device (10) according to claim 10 ,
The order changing unit sets the estimated time from when the abnormality is detected to when a dangerous event occurs in the vehicle as an FTTI (Fault Tolerant Time Interval), and when the abnormality is detected, the FTTI A vehicle electronic control device configured to change a schedule such that the execution priority of the functional safety thread is relatively higher than the execution priority of the non-functional safety thread.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021114366 | 2021-07-09 | ||
JP2021114366 | 2021-07-09 | ||
PCT/JP2021/045351 WO2023281766A1 (en) | 2021-07-09 | 2021-12-09 | Automotive computer control method and vehicular electronic control device |
Publications (3)
Publication Number | Publication Date |
---|---|
JPWO2023281766A1 JPWO2023281766A1 (en) | 2023-01-12 |
JPWO2023281766A5 JPWO2023281766A5 (en) | 2023-08-03 |
JP7409567B2 true JP7409567B2 (en) | 2024-01-09 |
Family
ID=84800594
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2023533039A Active JP7409567B2 (en) | 2021-07-09 | 2021-12-09 | Automotive computer control method and vehicle electronic control device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7409567B2 (en) |
WO (1) | WO2023281766A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008123439A (en) | 2006-11-15 | 2008-05-29 | Denso Corp | Operating system, program and mobile body manipulation support apparatus |
JP2013003724A (en) | 2011-06-14 | 2013-01-07 | Denso Corp | In-vehicle electronic control unit |
JP2014081847A (en) | 2012-10-17 | 2014-05-08 | Renesas Electronics Corp | Multi-thread processor |
JP2014170477A (en) | 2013-03-05 | 2014-09-18 | Mitsubishi Electric Corp | High availability system |
JP2016157247A (en) | 2015-02-24 | 2016-09-01 | トヨタ自動車株式会社 | Information processor |
JP2016181868A (en) | 2015-03-25 | 2016-10-13 | コニカミノルタ株式会社 | Image formation apparatus, control method and control program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017111662A (en) * | 2015-12-17 | 2017-06-22 | 日立オートモティブシステムズ株式会社 | Electronic controller |
JP6138308B1 (en) * | 2016-03-22 | 2017-05-31 | 三菱電機株式会社 | In-vehicle control device and ROM for in-vehicle control device |
-
2021
- 2021-12-09 JP JP2023533039A patent/JP7409567B2/en active Active
- 2021-12-09 WO PCT/JP2021/045351 patent/WO2023281766A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008123439A (en) | 2006-11-15 | 2008-05-29 | Denso Corp | Operating system, program and mobile body manipulation support apparatus |
JP2013003724A (en) | 2011-06-14 | 2013-01-07 | Denso Corp | In-vehicle electronic control unit |
JP2014081847A (en) | 2012-10-17 | 2014-05-08 | Renesas Electronics Corp | Multi-thread processor |
JP2014170477A (en) | 2013-03-05 | 2014-09-18 | Mitsubishi Electric Corp | High availability system |
JP2016157247A (en) | 2015-02-24 | 2016-09-01 | トヨタ自動車株式会社 | Information processor |
JP2016181868A (en) | 2015-03-25 | 2016-10-13 | コニカミノルタ株式会社 | Image formation apparatus, control method and control program |
Also Published As
Publication number | Publication date |
---|---|
WO2023281766A1 (en) | 2023-01-12 |
JPWO2023281766A1 (en) | 2023-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPWO2010010723A1 (en) | Multi-core system, vehicle electronic control unit, task switching method | |
KR20180022759A (en) | Method and device for handling safety critical errors | |
JP4985662B2 (en) | Program and control device | |
Negrean et al. | Response-time analysis for non-preemptive scheduling in multi-core systems with shared resources | |
JP5533789B2 (en) | In-vehicle electronic control unit | |
JP2015067107A (en) | Vehicle control device | |
JP7409567B2 (en) | Automotive computer control method and vehicle electronic control device | |
JP5699896B2 (en) | Information processing apparatus and abnormality determination method | |
US9128757B2 (en) | Method and lightweight mechanism for mixed-critical applications | |
JP2013152636A (en) | Information processing device and task scheduling method | |
CN115248724A (en) | Real-time scheduling for heterogeneous multi-core systems | |
Kim et al. | Reducing memory interference latency of safety-critical applications via memory request throttling and Linux Cgroup | |
JP6838234B2 (en) | Vehicle control device | |
CN114633705B (en) | Vehicle controls with synchronized driver | |
Zimmer et al. | A systematic approach for software interference analysis | |
JP6349444B2 (en) | Vehicle control device | |
JP5906584B2 (en) | Control apparatus and control method | |
JP7333251B2 (en) | electronic controller | |
JPWO2018211865A1 (en) | Vehicle control device | |
JP7605623B2 (en) | Vehicle control device | |
Koolwal et al. | Myths and realities of real-time linux software systems | |
WO2019188177A1 (en) | Information processing device | |
JPH0926888A (en) | Exclusive control device | |
JP7498845B2 (en) | Control device and control method | |
JP5703505B2 (en) | Computer with bus partition structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230220 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230220 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230912 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231031 |
|
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: 20231121 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231204 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7409567 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |