JP2013120430A - Control device and computer program thereof - Google Patents

Control device and computer program thereof Download PDF

Info

Publication number
JP2013120430A
JP2013120430A JP2011266884A JP2011266884A JP2013120430A JP 2013120430 A JP2013120430 A JP 2013120430A JP 2011266884 A JP2011266884 A JP 2011266884A JP 2011266884 A JP2011266884 A JP 2011266884A JP 2013120430 A JP2013120430 A JP 2013120430A
Authority
JP
Japan
Prior art keywords
access request
ram
control
storage means
program
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.)
Pending
Application number
JP2011266884A
Other languages
Japanese (ja)
Inventor
Atsushi Miki
敦志 三木
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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries 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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to JP2011266884A priority Critical patent/JP2013120430A/en
Publication of JP2013120430A publication Critical patent/JP2013120430A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a control device in which a memory protection range can be flexibly set while achieving an inexpensive memory protection function, and a computer program thereof.SOLUTION: An ECU 1 includes a plurality of control processing means (within an application program 40) for respectively implementing control processes to a plurality of on-vehicle devices such as a headlight 70; and a RAM 3 for storing data used for control by the control processing means. A RAM access range table 42 associates identification information of each of a plurality of control programs and an accessible address range of the RAM 3, and the table is stored in a ROM 4. When an address specified by an access request to the RAM 3 from the control program is within the accessible address range stored in the RAM access range table 42, an access request processing program 41 processes the access request.

Description

本発明は、複数の被制御機器に対する制御処理を行う制御装置及びコンピュータプログラムに関する。   The present invention relates to a control device and a computer program that perform control processing on a plurality of controlled devices.

近年、自動車の分野においては、車輌の高機能化が益々進んでおり、多種多様な機器が車輌に搭載され、これら車載機器を制御するための制御装置、所謂ECU(Electronic Control Unit)が多数搭載されている。例えば、ユーザのスイッチ操作などに応じてドアの開閉、ドアロックの施錠/開錠、ヘッドライトのオン/オフ、及びワイパーのオン/オフ等の制御を行うボディ系ECU、運転席近傍に配設されるメータ類の動作を制御するメータ系ECU、並びにカーナビゲーションシステムの制御を行うナビECU等の種々のECUが車輌には搭載されている。一般的にECUは、マイクロコンピュータ等の演算処理装置によって構成されており、制御プログラムを読み込んで実行することにより、車載機器の制御が実現されるため、処理動作における高い信頼性が必要とされる。   In recent years, in the field of automobiles, higher functions of vehicles have been increasingly advanced, and a wide variety of devices are mounted on vehicles, and a large number of so-called ECUs (Electronic Control Units) for controlling these on-vehicle devices are mounted. Has been. For example, a body ECU that controls the opening / closing of doors, locking / unlocking of door locks, turning on / off of headlights, and turning on / off of wipers according to user switch operations, etc. Various ECUs such as a meter ECU that controls the operation of the meters and a navigation ECU that controls the car navigation system are mounted on the vehicle. In general, the ECU is constituted by an arithmetic processing unit such as a microcomputer, and by controlling a vehicle-mounted device by reading and executing a control program, high reliability in processing operation is required. .

ECUは、演算処理を行うCPU(Central Processor Unit)、CPUが実行するアプリケーションプログラムを記憶するROM(Read Only Memory)、CPUが制御処理を実行する際に用いる各種のデータを一時的に記憶するRAM(Random Access Memory)、車載機器との間でセンサ信号及び駆動信号を入出力するための入出力インタフェース(以下、「入出力I/F」と表記する)、ECU間で情報を送受信するための通信インタフェース(以下、「通信I/F」と表記する)等を備えている。   The ECU includes a CPU (Central Processor Unit) that performs arithmetic processing, a ROM (Read Only Memory) that stores application programs executed by the CPU, and a RAM that temporarily stores various data used when the CPU executes control processing. (Random Access Memory), an input / output interface (hereinafter referred to as “input / output I / F”) for inputting / outputting sensor signals and drive signals to / from in-vehicle devices, and for transmitting / receiving information between ECUs A communication interface (hereinafter referred to as “communication I / F”) and the like are provided.

例えば、ドアロックの施錠/開錠を行うためのアプリケーションプログラムであるドアロック制御プログラムでは、車輌に装備された運転席、助手席、及び後部座席の左右のドアに配設されたドアロック用スイッチの信号に基づいて、各ドアをロックするドアロック機構を駆動して施錠/開錠を行う。運転席では、乗員の安全性確保のために運転者が4箇所のドアを全てロックするためのスイッチが設けられており、これらドアロック用スイッチの情報が、ボディ系ECUによって取得されて、オン/オフ情報として一時的にRAMに記憶される。ボディ系ECUは、RAMに記憶されたドアロック用スイッチのオン/オフ情報に従って各ドアのドアロック機構によるドアの施錠/開錠を制御する。同様に、ボディ系ECUは、運転席に配設されたヘッドライト用スイッチの操作によるヘッドライトのオン/オフ情報をRAMに記憶し、RAMに記憶されたヘッドライトのオン/オフ情報に従ってヘッドライトのオン/オフを制御する。   For example, in a door lock control program that is an application program for locking / unlocking a door lock, a door lock switch disposed on the left and right doors of a driver seat, a passenger seat, and a rear seat mounted on the vehicle Based on this signal, the door lock mechanism for locking each door is driven to lock / unlock the door. The driver's seat is provided with switches for the driver to lock all four doors to ensure the safety of passengers. Information on these door lock switches is acquired by the body system ECU and turned on. / Temporarily stored in the RAM as off information. The body ECU controls the locking / unlocking of the door by the door lock mechanism of each door according to the on / off information of the door lock switch stored in the RAM. Similarly, the body system ECU stores headlight on / off information by operating a headlight switch disposed in the driver's seat in the RAM, and the headlight according to the headlight on / off information stored in the RAM. Control on / off of.

ECUにおけるRAMへのデータの書き込みが予期せぬビットエラー等により誤作動し、例えば、ヘッドライト用スイッチ情報が、ドアロック用スイッチ情報用のRAMのメモリアドレスに書き込まれてしまうような事象が発生すると、ヘッドライト用スイッチの操作によって、ドアロック機構が制御されるというような不具合が発生してしまう。このため、RAMへのデータの書き込みにおいては、誤ったメモリアドレスへの書き込みを防止するための保護機能を持たせる必要がある。   Writing data to the RAM in the ECU malfunctions due to an unexpected bit error, etc. For example, an event occurs in which the headlight switch information is written to the memory address of the door lock switch information RAM Then, the malfunction that the door lock mechanism is controlled by operation of the switch for headlights will generate | occur | produce. For this reason, when writing data to the RAM, it is necessary to provide a protection function for preventing writing to an incorrect memory address.

特許文献1には、CPUとRAMとの間のアドレスバス上にハードウェアによるアドレス変換回路を備えてメモリを保護するメモリ保護装置が記載されている。このメモリ保護装置のアドレス変換回路は、メモリ保護モード時に、領域指定レジスタの指定条件により、アドレスバス上のメモリアドレスにおける所定の上位ビットを論理値0にマスクしたメモリアドレスを生成し、RAMに供給する。これにより、マスクされたRAMの領域にはアクセスが禁止され、RAMへの書き込みが保護されるというものである。   Patent Document 1 describes a memory protection device that includes a hardware address conversion circuit on an address bus between a CPU and a RAM to protect the memory. In the memory protection mode, the address conversion circuit of the memory protection device generates a memory address by masking a predetermined upper bit in the memory address on the address bus with a logical value 0 according to the specification condition of the area specification register, and supplies it to the RAM To do. As a result, access to the masked RAM area is prohibited, and writing to the RAM is protected.

特開平10−260901号公報Japanese Patent Laid-Open No. 10-260901

しかしながら、特許文献1に記載のメモリ保護装置は、メモリ保護のための機構をハードウェア回路で実現しているため、メモリ保護機構がない場合と比較して、部品を追加して回路を実装する必要があり、回路部品コスト及び製造コストが高くなるとともに、部品の実装面積も大きくなってしまうという問題点があった。   However, since the memory protection device described in Patent Document 1 implements a memory protection mechanism with a hardware circuit, the circuit is mounted with additional components compared to the case without the memory protection mechanism. There is a problem that the circuit component cost and the manufacturing cost increase, and the mounting area of the component also increases.

また、特許文献1に記載のメモリ保護装置は、メモリアドレスをマスクすることにより不正アドレスへのアクセスを防止する仕組みを持つため、メモリ保護範囲の下限アドレスと上限アドレスを柔軟に設定することができず、また同一のマスクパターンで設定できる範囲にメモリ保護範囲が限られてしまう。   In addition, since the memory protection device described in Patent Document 1 has a mechanism for preventing access to an illegal address by masking the memory address, the lower limit address and the upper limit address of the memory protection range can be set flexibly. In addition, the memory protection range is limited to a range that can be set with the same mask pattern.

本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、柔軟にメモリ保護範囲を設定することができ、さらには安価なメモリ保護機能を実現することができる制御装置及びコンピュータプログラムを提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to control a memory protection range that can be flexibly set and an inexpensive memory protection function can be realized. To provide an apparatus and a computer program.

本発明に係る制御装置は、複数の被制御機器に対する制御処理を夫々行う複数の制御処理手段と、該制御処理手段が制御に用いるデータを記憶する第1記憶手段とを備える制御装置において、複数の前記制御処理手段夫々の識別情報とアクセス可能な前記第1記憶手段のアドレス範囲とを対応させて記憶する第2記憶手段と、前記制御処理手段による前記第1記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理手段の識別情報に対応づけて前記第2記憶手段に記憶された前記第1記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理するアクセス要求処理手段とを備えることを特徴とする。   A control device according to the present invention includes a plurality of control processing units that respectively perform control processing for a plurality of controlled devices, and a first storage unit that stores data used for control by the control processing unit. A second storage means for storing the identification information of each of the control processing means in association with the accessible address range of the first storage means, and an access request to the first storage means by the control processing means. Access request processing means for processing the access request when the designated address is within the address range of the first storage means stored in the second storage means in association with the identification information of the control processing means It is characterized by providing.

本発明に係る制御装置は、前記第2記憶手段が、複数の前記制御処理手段夫々の識別情報と、書き込み可能な前記第1記憶手段のアドレス範囲及び読み出し可能な前記第1記憶手段のアドレス範囲とを対応させて記憶してあることを特徴とする。   In the control device according to the present invention, the second storage unit includes identification information of each of the plurality of control processing units, a writable address range of the first storage unit, and a readable address range of the first storage unit. Are stored in correspondence with each other.

本発明に係るコンピュータプログラムは、データを記憶する記憶手段を有するコンピュータに、複数の被制御機器に対する制御処理を行わせるコンピュータプログラムにおいて、前記コンピュータに、前記複数の被制御機器に対する制御処理を夫々行わせる複数の制御処理ステップと、前記コンピュータに、前記制御処理ステップによる前記記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理ステップの識別情報に対応づけて記憶された前記記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理させるアクセス要求処理ステップとを実行させることを特徴とする。   A computer program according to the present invention is a computer program for causing a computer having storage means for storing data to perform control processing for a plurality of controlled devices, and for performing control processing for the plurality of controlled devices respectively on the computer. A plurality of control processing steps, and an address specified by the computer in the access request to the storage means by the control processing step is stored in association with the identification information of the control processing step. An access request processing step for processing the access request when it is within the address range is executed.

本発明においては、第2記憶手段により、複数の制御処理手段夫々の識別情報とアクセス可能な第1記憶手段のアドレス範囲とを対応させて記憶し、アクセス要求処理手段により、制御処理手段による第1記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理手段の識別情報に対応づけて第2記憶手段に記憶された前記第1記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理する。これにより、第2記憶手段にアドレス範囲を記憶させておくことによって、複数の制御処理手段による第1記憶手段へのアクセス要求に対して、第1記憶手段を保護する保護機能を柔軟に設定することができる。   In the present invention, the second storage means stores the identification information of each of the plurality of control processing means in association with the accessible address range of the first storage means, and the access request processing means stores the first information by the control processing means. If the address specified in the access request to one storage means is within the address range of the first storage means stored in the second storage means in association with the identification information of the control processing means, the access Process the request. Thus, by storing the address range in the second storage means, a protection function for protecting the first storage means can be flexibly set against an access request to the first storage means by a plurality of control processing means. be able to.

本発明においては、第2記憶手段が、複数の制御処理手段夫々の識別情報と、書き込み可能な第1記憶手段のアドレス範囲及び読み出し可能な第1記憶手段のアドレス範囲とを対応させて記憶してある。これにより、第1記憶手段からの読み出し、及び第1記憶手段への書き込みの夫々のアクセスにおいて、第1記憶手段を保護する保護機能を設定することができる。   In the present invention, the second storage means stores the identification information of each of the plurality of control processing means in association with the writable address range of the first storage means and the readable address range of the first storage means. It is. Thus, a protection function for protecting the first storage unit can be set in each access of reading from the first storage unit and writing to the first storage unit.

本発明においては、コンピュータに、複数の被制御機器に対する制御処理を夫々行わせる複数の制御処理ステップと、該制御処理ステップによる記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理ステップの識別情報に対応づけて記憶された記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理させるアクセス要求処理ステップとを実行させるコンピュータプログラムによって、記憶手段を保護する保護機能を持たせる。これにより、記憶手段を保護する保護機能を実現するためのハードウェア回路を設ける必要がなく、製造コストを抑えることができる。   In the present invention, a plurality of control processing steps for causing a computer to perform control processing for a plurality of controlled devices respectively, and an address specified in the access request to the storage means by the control processing steps are the control processing steps. A protection function that protects the storage means is provided by a computer program that executes an access request processing step for processing the access request when it is within the address range of the storage means stored in association with the identification information. Thereby, it is not necessary to provide a hardware circuit for realizing a protection function for protecting the storage means, and the manufacturing cost can be reduced.

本発明による場合は、第2記憶手段により、複数の制御処理手段夫々の識別情報とアクセス可能な第1記憶手段のアドレス範囲とを対応させて記憶し、アクセス要求処理手段により、制御処理手段による第1記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理手段の識別情報に対応づけて第2記憶手段に記憶された前記第1記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理するため、第2記憶手段にアドレス範囲を記憶させておくことによって、複数の制御処理手段による第1記憶手段へのアクセス要求に対して、第1記憶手段を保護する保護機能を柔軟に設定することができる。   In the case of the present invention, the second storage means stores the identification information of each of the plurality of control processing means in association with the accessible address range of the first storage means, and the access request processing means uses the control processing means. When the address specified in the access request to the first storage means is within the address range of the first storage means stored in the second storage means in association with the identification information of the control processing means, In order to process the access request, by storing the address range in the second storage means, a protection function for protecting the first storage means against the access requests to the first storage means by a plurality of control processing means is provided. It can be set flexibly.

本発明の実施の形態に係る制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the control apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る制御装置のソフトウェア構成を示す模式図である。It is a schematic diagram which shows the software structure of the control apparatus which concerns on embodiment of this invention. 各制御プログラムに対するRAMのアクセス範囲について説明するための模式図である。It is a schematic diagram for demonstrating the access range of RAM with respect to each control program. ROMに記憶するRAMアクセス範囲テーブルを示す図表である。It is a chart which shows the RAM access range table memorize | stored in ROM. RAMへのアクセス要求を処理する手順を示すフローチャートである。It is a flowchart which shows the procedure which processes the access request to RAM.

(実施の形態1)
以下、本発明をその実施の形態を示す図面に基づき具体的に説明する。図1は、本発明の実施の形態に係る制御装置1(以下、「ECU1」と表記する)の構成を示すブロック図である。図1では車載制御装置の例を示すが、本発明は、家庭用電気製品、産業用機器等の様々な電気機器において用いられる制御装置について適用可能である。ECU1は、車輌に搭載されたヘッドライト70、ヘッドライト用アクチュエータ71、ドアロック機構72等の車載機器を制御する。即ち、ECU1は、ユーザの操作を受け付けて、ヘッドライト70の点灯/消灯を制御し、舵角に応じてヘッドライト用アクチュエータ71を駆動し、ヘッドライト70の照射方向を自動調整するAFS(Adaptive Front-lighting System)制御を行い、さらにドアロック機構72の施錠/解錠を制御するものである。
(Embodiment 1)
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof. FIG. 1 is a block diagram showing a configuration of a control device 1 (hereinafter referred to as “ECU1”) according to an embodiment of the present invention. Although FIG. 1 shows an example of an in-vehicle control device, the present invention can be applied to control devices used in various electric devices such as household electric appliances and industrial devices. The ECU 1 controls in-vehicle devices such as a headlight 70, a headlight actuator 71, and a door lock mechanism 72 mounted on the vehicle. That is, the ECU 1 receives an operation of the user, controls turning on / off of the headlight 70, drives the headlight actuator 71 according to the steering angle, and automatically adjusts the irradiation direction of the headlight 70. Front-lighting System) control, and further, locking / unlocking of the door lock mechanism 72 is controlled.

ECU1は、CPU2、RAM3、ROM4、入出力I/F5及び通信I/F6等を備えて構成されている。上記のヘッドライト70、ヘッドライト用アクチュエータ71及びドアロック機構72等の車載機器は、ECU1の入出力I/F5にケーブルなどを介して接続されている。入出力I/F5は、これらの車載機器との間で信号の入出力を行うことができ、CPU2から与えられた動作命令などを各車載機器へ出力すると共に、各車載機器から入力された情報をCPU2へ与える。   The ECU 1 includes a CPU 2, a RAM 3, a ROM 4, an input / output I / F 5, a communication I / F 6, and the like. In-vehicle devices such as the headlight 70, the headlight actuator 71, and the door lock mechanism 72 are connected to the input / output I / F 5 of the ECU 1 via a cable or the like. The input / output I / F 5 can input / output signals to / from these in-vehicle devices, and outputs an operation command given from the CPU 2 to each in-vehicle device and information input from each in-vehicle device. Is given to the CPU 2.

CPU2は、ROM4に予め記憶されたアプリケーションプログラム40を読み出して実行することにより、入出力I/F5に接続された車載機器の制御処理を行う。またCPU2は、制御処理を行う過程の演算などにて発生した一時的なデータをRAM3に記憶しながら処理を進める。ROM4は、例えばEEPROM(Electrically Erasable Programmable ROM)等の不揮発性のメモリ素子で構成され、アプリケーションプログラム40、RAM3へのアクセス要求を処理するアクセス要求処理プログラム41、RAM3へのアクセス範囲を記述したRAMアクセス範囲テーブル42等が予め記憶されている。RAM3は、SRAM(Static RAM)又はDRAM(Dynamic RAM)等のメモリ素子で構成されており、CPU2の処理過程で発生する種々のデータ等を一時的に記憶する。   The CPU 2 performs control processing of the in-vehicle device connected to the input / output I / F 5 by reading and executing the application program 40 stored in advance in the ROM 4. In addition, the CPU 2 advances the process while storing temporary data generated in the process of performing the control process in the RAM 3. The ROM 4 is composed of a non-volatile memory element such as an EEPROM (Electrically Erasable Programmable ROM), for example. The application program 40, an access request processing program 41 for processing an access request to the RAM 3, and a RAM access describing an access range to the RAM 3 A range table 42 and the like are stored in advance. The RAM 3 is composed of a memory element such as SRAM (Static RAM) or DRAM (Dynamic RAM), and temporarily stores various data generated in the process of the CPU 2.

通信I/F6は、車輌に搭載された他のECUに車載LANを介して接続されており、CAN(Controller Area Network)などのプロトコルに従って他のECUとデータの送受信を行う。通信I/F6は、CPU2から与えられたデータを送信し、他のECUから受信したデータをCPU2へ与える。これによりECU1は、他のECUに接続された車載機器から得られる情報を通信I/F6の通信によって取得することができると共に、他のECUに接続された車載機器への動作命令などを送信して制御することができる。   The communication I / F 6 is connected to another ECU mounted on the vehicle via an in-vehicle LAN, and transmits / receives data to / from another ECU according to a protocol such as CAN (Controller Area Network). Communication I / F 6 transmits data provided from CPU 2 and provides data received from other ECUs to CPU 2. Thereby, the ECU 1 can acquire information obtained from the in-vehicle device connected to the other ECU by communication of the communication I / F 6 and transmits an operation command to the in-vehicle device connected to the other ECU. Can be controlled.

図2は、本発明の実施の形態に係る制御装置のソフトウェア構成を示す模式図であり、ECU1のCPU2がROM4に記憶されたアプリケーションプログラム40を実行した場合の構成を示してある。アプリケーションプログラム40は、ヘッドライト点灯制御プログラム400、AFS制御プログラム401、及びドアロック制御プログラム402等の複数の制御プログラムを備えており、これらの制御プログラムによって行われるRAM3へのアクセス要求は、アクセス要求処理プログラム41により実行されるように構成されている。   FIG. 2 is a schematic diagram showing a software configuration of the control device according to the embodiment of the present invention, and shows a configuration when the CPU 2 of the ECU 1 executes the application program 40 stored in the ROM 4. The application program 40 includes a plurality of control programs such as a headlight lighting control program 400, an AFS control program 401, and a door lock control program 402. An access request to the RAM 3 performed by these control programs is an access request. It is configured to be executed by the processing program 41.

ヘッドライト点灯制御プログラム400は、運転席に配設されたヘッドライト用スイッチの操作によるヘッドライト70のオン/オフ情報をRAM3に記憶し、RAM3に記憶されたヘッドライト70のオン/オフ情報に従ってヘッドライト70の点灯/消灯を制御する。   The headlight lighting control program 400 stores on / off information of the headlight 70 by operation of a headlight switch disposed in the driver's seat in the RAM 3, and according to the on / off information of the headlight 70 stored in the RAM 3. The headlight 70 is turned on / off.

AFS制御プログラム401は、車輌に搭載された舵角センサが検出する舵角情報を有するECUから、また、車輌の走行位置に係る情報をナビゲーションシステムから、通信I/F6の通信によりそれぞれ取得してRAM3に記憶し、記憶したこれらの情報に応じて車輌のヘッドライト用アクチュエータ71を動作させて、ヘッドライト70の照射方向を車輌の走行方向に合わせて調整する制御処理を行う。   The AFS control program 401 obtains information related to the traveling position of the vehicle from the ECU having the rudder angle information detected by the rudder angle sensor mounted on the vehicle and from the navigation system through communication I / F 6. A control process is performed in which the headlight actuator 71 of the vehicle is operated according to the stored information stored in the RAM 3 and the irradiation direction of the headlight 70 is adjusted in accordance with the traveling direction of the vehicle.

ドアロック制御プログラム402は、運転席、助手席、及び後部座席の左右のドアに配設されたドアロック用スイッチの信号に基づいて、各ドアをロックするドアロック機構72を駆動して施錠/開錠を行うほか、ユーザが所持する携帯型の通信器からのオン/オフ情報に応じてドアロック機構72を動作させて車輌のドアの施錠/解錠を制御する処理を行う。ドアロック用スイッチのオン/オフ情報、及び携帯型の通信器からのオン/オフ情報は、RAM3に一時的に記憶され、記憶された情報に基づいてドアロック制御プログラム402は、ドアロック機構72を駆動して施錠/開錠を制御する処理を行う。   The door lock control program 402 drives the door lock mechanism 72 that locks each door based on the signals of the door lock switches disposed on the left and right doors of the driver's seat, the passenger seat, and the rear seat. In addition to unlocking, the door lock mechanism 72 is operated in accordance with on / off information from a portable communication device possessed by the user to control locking / unlocking of the vehicle door. The on / off information of the door lock switch and the on / off information from the portable communication device are temporarily stored in the RAM 3, and the door lock control program 402 is based on the stored information. Is driven to control locking / unlocking.

アクセス要求処理プログラム41は、各制御プログラムが実行するRAM3へのアクセス要求が、各制御プログラムに割り当てられたRAM3のアクセス可能な範囲内の処理要求であるかを判定し、アクセス可能であれば、該アクセス要求を処理する。具体的には、アクセス要求処理プログラム41は、各制御プログラムが有する識別情報であるID番号に基づき、各制御プログラムがアクセス可能なアドレス範囲をRAMアクセス範囲テーブル42から読み出し、アクセス要求にて指定されるアドレスが、アクセス可能なアドレス範囲内にあるかどうかを判定する。アクセス要求処理プログラム41は、アクセス要求にて指定されるアドレスが、アクセス可能なアドレス範囲内にある場合には、アクセス要求を実行し、成功応答を該アクセス要求を行った制御プログラムに戻す。一方、アクセス要求にて指定されるアドレスが、アクセス可能なアドレス範囲内にない場合には、アクセス要求を実行することなく、失敗応答を該アクセス要求を行った制御プログラムに戻す。   The access request processing program 41 determines whether an access request to the RAM 3 executed by each control program is a processing request within the accessible range of the RAM 3 assigned to each control program. The access request is processed. Specifically, the access request processing program 41 reads an address range accessible by each control program from the RAM access range table 42 based on an ID number that is identification information possessed by each control program, and is designated by the access request. To determine whether the address is within the accessible address range. If the address specified by the access request is within the accessible address range, the access request processing program 41 executes the access request and returns a success response to the control program that made the access request. On the other hand, if the address specified by the access request is not within the accessible address range, the failure response is returned to the control program that made the access request without executing the access request.

図3は、各制御プログラムに対するRAM3のアクセス範囲について説明するための模式図であり、図4は、ROM4に記憶するRAMアクセス範囲テーブル42を示す図表である。例えば、ヘッドライト点灯制御プログラム400は、識別情報(ID:0)を有しており、RAM3内でアクセスできる範囲は、0x1000番地から0x1587番地であると予め決められている。ここで、0xは16進数を意味する。同様に、AFS制御プログラム401は、識別情報(ID:1)を有し、アクセス可能範囲が0x1588番地から0x549F番地、ドアロック制御プログラム402は、識別情報(ID:2)を有し、アクセス可能範囲が0x54A0番地から0x600B番地であると予め決められている。図4に示すように、RAM3へのアクセス可能範囲は、上限アドレスと下限アドレスとの間のアドレス範囲(上限アドレスと下限アドレスとを含む)として、テーブル形式でROM4に記憶されている。   FIG. 3 is a schematic diagram for explaining the access range of the RAM 3 for each control program, and FIG. 4 is a chart showing the RAM access range table 42 stored in the ROM 4. For example, the headlight lighting control program 400 has identification information (ID: 0), and the accessible range in the RAM 3 is determined in advance from 0x1000 to 0x1587. Here, 0x means a hexadecimal number. Similarly, the AFS control program 401 has identification information (ID: 1), the accessible range is from addresses 0x1588 to 0x549F, and the door lock control program 402 has identification information (ID: 2) and is accessible. It is predetermined that the range is from 0x54A0 address to 0x600B address. As shown in FIG. 4, the accessible range to the RAM 3 is stored in the ROM 4 in a table format as an address range (including the upper limit address and the lower limit address) between the upper limit address and the lower limit address.

つぎに、図5によりRAM3へのアクセス要求の処理について説明する。図5は、RAM3へのアクセス要求を処理する手順を示すフローチャートである。まず、ヘッドライト点灯制御プログラム400、AFS制御プログラム401、及びドアロック制御プログラム402のいずれかの制御プログラムからRAM3へのアクセス要求が発行される(ステップS1)。アクセス要求は、例えば、ヘッドライト用スイッチのオン/オフ情報等をRAM3に書き込んだり、逆にRAM3から読み出したりする要求である。   Next, processing of an access request to the RAM 3 will be described with reference to FIG. FIG. 5 is a flowchart showing a procedure for processing an access request to the RAM 3. First, an access request to the RAM 3 is issued from any one of the headlight lighting control program 400, the AFS control program 401, and the door lock control program 402 (step S1). The access request is, for example, a request for writing on / off information of the headlight switch in the RAM 3 and reading from the RAM 3.

つぎに、アクセス要求処理プログラム41は、RAMアクセス範囲テーブル42から、RAM3へのアクセス要求を発行した制御プログラムのID番号に対応するRAM3のアクセス可能なアドレス範囲を取得する(ステップS2)。例えば、アクセス要求を発行した制御プログラムがヘッドライト制御プログラム400である場合、ID番号は0であり、アクセス要求処理プログラム41がRAMアクセス範囲テーブル42から取得するアドレス範囲は、上限アドレス0x1000、下限アドレス0x1587となる。ここで、ID番号は、ヘッドライト制御プログラム400が発行するアクセス要求のプログラム内に記述されていることにより、アクセス要求処理プログラム41は、アクセス要求を発行した制御プログラムの識別情報を判読することができる。   Next, the access request processing program 41 obtains an accessible address range of the RAM 3 corresponding to the ID number of the control program that issued the access request to the RAM 3 from the RAM access range table 42 (step S2). For example, if the control program that issued the access request is the headlight control program 400, the ID number is 0, and the address range that the access request processing program 41 acquires from the RAM access range table 42 is the upper limit address 0x1000, the lower limit address 0x1587. Here, since the ID number is described in the access request program issued by the headlight control program 400, the access request processing program 41 can read the identification information of the control program that issued the access request. it can.

アクセス要求処理プログラム41は、アクセス要求にて指定されるアドレスがRAMアクセス範囲テーブル42から取得したアドレス範囲内にあるかどうかを判定する(ステップS3)。アクセス要求処理プログラム41は、アクセス要求にて指定されるアドレスが、アクセス可能なアドレス範囲内にある場合には(ステップS3:YES)、アクセス要求を実行してRAMにアクセスし(ステップS4)、該アクセス要求を行った制御プログラムに成功応答を戻す(ステップS5)。例えば、ヘッドライト制御プログラム400が発行したアクセス要求がRAM3のアドレス0x1325を指定している場合には、アクセス可能な範囲にあり、ステップS4及びステップS5の処理手順が行われる。   The access request processing program 41 determines whether the address specified in the access request is within the address range acquired from the RAM access range table 42 (step S3). If the address specified in the access request is within the accessible address range (step S3: YES), the access request processing program 41 executes the access request and accesses the RAM (step S4). A success response is returned to the control program that made the access request (step S5). For example, when the access request issued by the headlight control program 400 specifies the address 0x1325 of the RAM 3, it is within the accessible range, and the processing procedure of step S4 and step S5 is performed.

一方、アクセス要求処理プログラム41は、アクセス要求にて指定されるアドレスが、アクセス可能なアドレス範囲内にない場合には(ステップS3:NO)、アクセス要求を実行することなく、該アクセス要求を行った制御プログラムに失敗応答を戻す(ステップS6)。例えば、ヘッドライト点灯制御プログラム400が発行したアクセス要求がRAM3のアドレス0x1630を指定している場合には、アクセス可能な範囲ではないため、ステップS6の処理手順が行われる。   On the other hand, if the address specified in the access request is not within the accessible address range (step S3: NO), the access request processing program 41 issues the access request without executing the access request. A failure response is returned to the control program (step S6). For example, when the access request issued by the headlight lighting control program 400 specifies the address 0x1630 of the RAM 3, it is not within the accessible range, so the processing procedure of step S6 is performed.

上述のように、本実施形態においては、ECU1がヘッドライト70、ヘッドライト用アクチュエータ71及びドアロック機構72等の複数の車載機器に対し、制御処理を夫々行う複数の制御プログラム(ヘッドライト点灯制御プログラム400、AFS制御プログラム401及びドアロック制御プログラム402等)と、該制御プログラムが制御に用いるデータを記憶するRAM3とを備えている。RAMアクセス範囲テーブル42は、複数の制御プログラム夫々の識別情報(ID番号)と、アクセス可能なRAM3のアドレス範囲とを対応させるテーブルであり、該テーブルをROM4に記憶しておく。制御プログラムによるRAM3へのアクセス要求にて指定されたアドレスが、該アクセス要求を発行した制御プログラムの識別情報に対応づけてRAMアクセス範囲テーブル42に記憶されたアクセス可能なアドレス範囲内にある場合に、アクセス要求処理プログラム41は、該アクセス要求を処理するように機能する。これにより、複数の制御プログラムによるRAM3へのアクセス要求に対して、RAM3を保護する保護機能をRAMアクセス範囲テーブル42により柔軟に設定することができる。また、RAM3を保護する保護機能をコンピュータプログラムによるソフトウェア処理で実現することによって、ハードウェア回路を設ける必要がなく、回路部品が節減され、製造コストを抑えることができるとともに、回路部品の実装面積の増大を抑制することができる。   As described above, in the present embodiment, the ECU 1 controls a plurality of control programs (headlight lighting control) for performing control processing on a plurality of in-vehicle devices such as the headlight 70, the headlight actuator 71, and the door lock mechanism 72, respectively. A program 400, an AFS control program 401, a door lock control program 402, etc.) and a RAM 3 for storing data used by the control program for control. The RAM access range table 42 is a table that associates the identification information (ID number) of each of the plurality of control programs with the address range of the accessible RAM 3, and the table is stored in the ROM 4. When the address specified in the access request to the RAM 3 by the control program is within the accessible address range stored in the RAM access range table 42 in association with the identification information of the control program that issued the access request The access request processing program 41 functions to process the access request. Thereby, a protection function for protecting the RAM 3 can be flexibly set by the RAM access range table 42 in response to access requests to the RAM 3 by a plurality of control programs. In addition, by realizing a protection function for protecting the RAM 3 by software processing by a computer program, it is not necessary to provide a hardware circuit, circuit parts can be saved, manufacturing costs can be reduced, and the mounting area of the circuit parts can be reduced. The increase can be suppressed.

なお、上述の実施形態においては、RAM3へのアクセス可能範囲を書き込み及び読み出しで同じ範囲としているが、書き込み時のアクセス可能範囲と、読み出し時のアクセス可能範囲を異なるようにしてもよい。書き込み時のアクセス可能範囲と、読み出し時のアクセス可能範囲を異なるようにすることは、例えば、複数の制御プログラムのうち一つの制御プログラムがスイッチ情報等の所定情報をRAM3に書き込み、書き込まれた該所定情報を複数の制御プログラムが共通に読み出して用いる場合に有効である。なお、この場合、書き込み時のアクセス可能範囲と、読み出し時のアクセス可能範囲を異なるため、図4に示すようなテーブルを、書き込み用と読み出し用とでそれぞれ1つずつ予め設定し、合計2つのテーブルをROM4に記憶しておく。   In the above-described embodiment, the accessible range to the RAM 3 is set to the same range for writing and reading. However, the accessible range for writing may be different from the accessible range for reading. To make the accessible range at the time of writing different from the accessible range at the time of reading, for example, one control program out of a plurality of control programs writes predetermined information such as switch information into the RAM 3 and writes the information. This is effective when the predetermined information is read and used in common by a plurality of control programs. In this case, since the accessible range at the time of writing is different from the accessible range at the time of reading, a table as shown in FIG. A table is stored in the ROM 4.

また、上述の実施の形態においては、各制御プログラム毎に識別情報を持たせているが、各制御プログラムを更に複数の機能的にまとまったプログラムモジュール単位、プログラム部品単位に分け、プログラムモジュール単位、又はプログラム部品単位で個別に識別情報を設け、各プログラムモジュール毎に、又は各プログラム部品毎にRAM3へのアクセス可能なアドレス範囲を定めるRAMアクセス範囲テーブル42をROM4に記憶するようにしてもよい。この場合、プログラムモジュール単位、又はプログラム部品単位でRAM3へのアクセス要求を制御するので、よりきめ細かにRAM3の保護範囲を設定することができ、本発明は、このようにプログラムモジュール単位、又はプログラム部品単位でアクセス範囲を設定してRAM3へのアクセスを制御する場合を含んでいる。   Further, in the above-described embodiment, each control program has identification information, but each control program is further divided into a plurality of functionally organized program module units, program component units, program module units, Alternatively, identification information may be provided individually for each program part, and a RAM access range table 42 that defines an accessible address range for the RAM 3 for each program module or for each program part may be stored in the ROM 4. In this case, since the access request to the RAM 3 is controlled in units of program modules or program parts, the protection range of the RAM 3 can be set more finely, and the present invention can thus be set in units of program modules or program parts. This includes the case where the access range is set in units to control access to the RAM 3.

なお、開示された実施の形態は、全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上述の説明ではなく特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。   The disclosed embodiments should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 ECU(制御装置)
3 RAM(第1記憶手段、記憶手段)
4 ROM(第2記憶手段)
41 アクセス要求処理プログラム(アクセス要求処理手段、アクセス要求処理ステップ)
400 ヘッドライト点灯制御プログラム(制御処理手段、制御処理ステップ)
401 AFS制御プログラム(制御処理手段、制御処理ステップ)
402 ドアロック制御プログラム(制御処理手段、制御処理ステップ)
1 ECU (control device)
3 RAM (first storage means, storage means)
4 ROM (second storage means)
41 Access request processing program (access request processing means, access request processing step)
400 Headlight lighting control program (control processing means, control processing step)
401 AFS control program (control processing means, control processing step)
402 Door lock control program (control processing means, control processing step)

Claims (3)

複数の被制御機器に対する制御処理を夫々行う複数の制御処理手段と、該制御処理手段が制御に用いるデータを記憶する第1記憶手段とを備える制御装置において、
複数の前記制御処理手段夫々の識別情報とアクセス可能な前記第1記憶手段のアドレス範囲とを対応させて記憶する第2記憶手段と、
前記制御処理手段による前記第1記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理手段の識別情報に対応づけて前記第2記憶手段に記憶された前記第1記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理するアクセス要求処理手段と
を備えることを特徴とする制御装置。
In a control device comprising a plurality of control processing means for performing control processing for a plurality of controlled devices, and a first storage means for storing data used for control by the control processing means,
Second storage means for storing the identification information of each of the plurality of control processing means in correspondence with the address range of the accessible first storage means;
The address range of the first storage means in which the address specified in the access request to the first storage means by the control processing means is stored in the second storage means in association with the identification information of the control processing means An access request processing means for processing the access request when the access request is present.
前記第2記憶手段は、複数の前記制御処理手段夫々の識別情報と、書き込み可能な前記第1記憶手段のアドレス範囲及び読み出し可能な前記第1記憶手段のアドレス範囲とを対応させて記憶してある
ことを特徴とする請求項1に記載の制御装置。
The second storage means stores the identification information of each of the plurality of control processing means in association with the writable address range of the first storage means and the readable address range of the first storage means. The control device according to claim 1, wherein:
データを記憶する記憶手段を有するコンピュータに、複数の被制御機器に対する制御処理を行わせるコンピュータプログラムにおいて、
前記コンピュータに、前記複数の被制御機器に対する制御処理を夫々行わせる複数の制御処理ステップと、
前記コンピュータに、前記制御処理ステップによる前記記憶手段へのアクセス要求にて指定されたアドレスが、該制御処理ステップの識別情報に対応づけて記憶された前記記憶手段のアドレス範囲内にある場合に、該アクセス要求を処理させるアクセス要求処理ステップと
を実行させることを特徴とするコンピュータプログラム。
In a computer program for causing a computer having storage means for storing data to perform control processing on a plurality of controlled devices,
A plurality of control processing steps for causing the computer to perform control processing on the plurality of controlled devices, respectively;
When the address specified in the computer in the access request to the storage means by the control processing step is within the address range of the storage means stored in association with the identification information of the control processing step, An access request processing step for processing the access request is executed.
JP2011266884A 2011-12-06 2011-12-06 Control device and computer program thereof Pending JP2013120430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011266884A JP2013120430A (en) 2011-12-06 2011-12-06 Control device and computer program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011266884A JP2013120430A (en) 2011-12-06 2011-12-06 Control device and computer program thereof

Publications (1)

Publication Number Publication Date
JP2013120430A true JP2013120430A (en) 2013-06-17

Family

ID=48773057

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011266884A Pending JP2013120430A (en) 2011-12-06 2011-12-06 Control device and computer program thereof

Country Status (1)

Country Link
JP (1) JP2013120430A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298623A (en) * 2013-07-16 2015-01-21 横河电机株式会社 Electronic device, operating system and access control method
JP2017207952A (en) * 2016-05-19 2017-11-24 日本電信電話株式会社 Processing device, access control method, and access control program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298623A (en) * 2013-07-16 2015-01-21 横河电机株式会社 Electronic device, operating system and access control method
JP2015022344A (en) * 2013-07-16 2015-02-02 横河電機株式会社 Electronic device, operating system, and access control method
US9898420B2 (en) 2013-07-16 2018-02-20 Yokogawa Electric Corporation Electronic device, operating system and access control method for protection of a register through an application programming interface
JP2017207952A (en) * 2016-05-19 2017-11-24 日本電信電話株式会社 Processing device, access control method, and access control program

Similar Documents

Publication Publication Date Title
JP5776779B2 (en) In-vehicle gateway device and vehicle communication system
US7705713B2 (en) Control unit having a deactivatable interface
US9560061B2 (en) Motor vehicle with a driving behavior which can be modified at a later stage using an application program
CN109714072B (en) Electronic control device, communication management method, and non-transitory storage medium
WO2017195389A1 (en) Onboard control device, control method, and computer program
EP3872635A1 (en) In-vehicle equipment controller and vehicle control system
WO2012132218A1 (en) Processor system and control method therefor
US20070043951A1 (en) Safety device for electronic devices
JP2013120430A (en) Control device and computer program thereof
EP3872631B1 (en) In-vehicle equipment controller and vehicle control system
EP3872632B1 (en) In-vehicle equipment control device
US20220300612A1 (en) Security processing device
US9703728B2 (en) Bus system and method of protected memory access
KR20190100074A (en) Memory security for automotive functional safety compliance with independent downstream processes
US11500403B2 (en) System and method for power supply voltage scaling for secure embedded systems
EP3961379B1 (en) Software update device, software update method, non-transitory storage medium, and vehicle
CN115706676A (en) Method for the trusted data transmission between controllers of a vehicle, assembly comprising controllers, computer program and vehicle
CN218122512U (en) Vehicle-mounted domain controller system
JP4811132B2 (en) Vehicle antitheft device
JP4615699B2 (en) Memory rewrite security system
JP2007237798A (en) Information recording device for vehicle
JP2008144600A (en) Vehicular electronic control system and installation method of vehicular electronic control device
Gandhi et al. Techniques and measures for improving domain controller availability while maintaining functional safety in mixed criticality automotive safety systems
CN114911606A (en) Computing unit, method for verifying messages thereof, computer program and vehicle
JP3400177B2 (en) Multiplex transmission equipment for vehicles