JP2010165210A - Control device - Google Patents

Control device Download PDF

Info

Publication number
JP2010165210A
JP2010165210A JP2009007433A JP2009007433A JP2010165210A JP 2010165210 A JP2010165210 A JP 2010165210A JP 2009007433 A JP2009007433 A JP 2009007433A JP 2009007433 A JP2009007433 A JP 2009007433A JP 2010165210 A JP2010165210 A JP 2010165210A
Authority
JP
Japan
Prior art keywords
cache
software
common information
storage means
cores
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009007433A
Other languages
Japanese (ja)
Other versions
JP5245848B2 (en
Inventor
Tatsumichi Okamura
竜路 岡村
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2009007433A priority Critical patent/JP5245848B2/en
Publication of JP2010165210A publication Critical patent/JP2010165210A/en
Application granted granted Critical
Publication of JP5245848B2 publication Critical patent/JP5245848B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a control device for achieving effective use of a cache. <P>SOLUTION: A control device 1 includes: a main storage means 3 for storing software; a central arithmetic processing means including two cores 9 and 10: two sub-storage means 7 and 8 including a part of the software; and an information determination means 15 for, when the software part of each control mode corresponding to all the two sub-storage means 7 and 8 in the software includes common information, and one core 9 fails in a reading operation to read the software part including common information from one corresponding sub-storage means 7, determining whether the other core 10 is executing the software part in the same control mode as that of the software part including the common information being the object of the reading operation after one sub-storage means 7 requests the software part including the common information being the object of the reading operation to the main storage means 3. When the determination result of the information determination means 15 is determined to be positive, one core 9 executes the reading operation of the software part stored in the other sub-storage means 8. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、乗用車、トラック、バス等の車両に適用して好適なECU(Electronic Control Unit)等の制御装置に関する。   The present invention relates to a control device such as an ECU (Electronic Control Unit) suitable for application to vehicles such as passenger cars, trucks, and buses.

近年の車両においては、車両における様々な制御を実現するために、車載機器に関する種々の制御情報を検出するセンサ、これらの種々の制御情報を用いて車載機器を制御する制御装置としてECUを備えている。これらのECUの相互間はCAN(Controller Area Network)等の通信規格により接続されて相互に必要な情報を授受している。車載機器は、例えばガソリン車であれば、エンジン、トランスミッション等を含み、ハイブリッド車であれば、エンジン、モータ、発電機、インバータ、動力分割機構等を含む。   In recent vehicles, in order to realize various controls in the vehicle, a sensor that detects various control information related to the in-vehicle device, and an ECU as a control device that controls the in-vehicle device using the various control information. Yes. These ECUs are connected to each other according to a communication standard such as CAN (Controller Area Network) and exchange necessary information. The in-vehicle device includes, for example, an engine, a transmission, and the like for a gasoline vehicle, and includes an engine, a motor, a generator, an inverter, a power split mechanism, and the like for a hybrid vehicle.

このようなECUにおいては、汎用のパーソナルコンピュータやワークステーションと同様に、CPU(Central Processing Unit)の備えるコアの高速化すなわち高クロック化の進歩に比して、主メモリすなわちROM(Read Only Memory)の高速化が遅れており、処理性能をCPUのコアの高速化に即して高めることが難しいという問題が生じる。このため、例えば特許文献1に記載されているように、複数のコアを備えて、制御を実現するための処理をより高速に実行することが行われている。   In such an ECU, as with a general-purpose personal computer or workstation, a main memory, that is, a ROM (Read Only Memory), is compared with a progress in speeding up of a core provided in a CPU (Central Processing Unit). However, it is difficult to increase the processing performance in accordance with the speeding up of the CPU core. For this reason, as described in Patent Document 1, for example, a plurality of cores are provided, and processing for realizing control is performed at higher speed.

ここで、ECUすなわち制御装置内における主メモリすなわちROMについては複数のコアに対して共通利用することが行われているが、ROM内に格納される制御用のソフトの全部を含む一部をコピーする機能を有するキャッシュについては、複数のコアに対応させて備える必要があるため、複数のコアに対応させてROMよりも近接した領域に設けられており、複数のキャッシュはそれぞれ別々に動作する。   Here, the main memory, that is, the ROM in the ECU, that is, the control device, is commonly used for a plurality of cores, but a part including all of the control software stored in the ROM is copied. Since the cache having the function to be provided needs to be provided corresponding to a plurality of cores, the cache is provided in an area closer to the ROM corresponding to the plurality of cores, and each of the plurality of caches operates separately.

特開2007−241601号公報JP 2007-241601 A

ところが、このような特許文献1に記載の制御装置においては、制御装置内の複数のキャッシュはそれぞれ別々つまり個別に動作しているため、ROMからリロードされるソフトの一部が共通であって、共通コードを含んでいる場合においても、個別にリロードされることとなり、キャッシュからソフトを読み取ることができないキャッシュミスも個別に発生する。   However, in such a control device described in Patent Document 1, since a plurality of caches in the control device operate separately, that is, individually, a part of software reloaded from the ROM is common, Even when a common code is included, it is reloaded individually, and a cache miss in which software cannot be read from the cache also occurs individually.

つまり、キャッシュミスが発生する時点において、ROMからリロードし直すことを招き、遅延時間が増大して処理に必要な実行時間が増大し、複数のコア相互間の処理時間のばらつきの増大を招くという問題が生じ、また、複数のコアそれぞれにキャッシュを備えるため、キャッシュ全体としての容量増大を招くという問題も生じることとなり、より適切にキャッシュを有効活用することが実現できていないという課題が生じていた。   In other words, when a cache miss occurs, reloading from the ROM is caused, delay time increases, execution time required for processing increases, and processing time variation among a plurality of cores increases. There is a problem, and since each of the multiple cores has a cache, there is a problem that the capacity of the entire cache is increased, and there is a problem that the cache cannot be effectively used effectively. It was.

本発明は、上記課題に鑑み、より適切にキャッシュを有効活用することを実現できる制御装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a control device that can realize cache utilization more appropriately.

上記の問題を解決するため、本発明に係る制御装置は、
ソフトを記憶する主記憶手段と、
二つのコアを含む中央演算処理手段と、
前記二つのコアに対応して、前記ソフトの一部を記憶する二つの副記憶手段と、
を含み、
前記ソフトのうち、前記二つの副記憶手段全てに対応する各制御モードのソフト部分が共通情報を含み、
前記二つのコアのうち一のコアが、対応する一の前記副記憶手段から前記共通情報を含む前記ソフト部分を読み込む読込動作を失敗した場合に、
前記一の副記憶手段が前記読込動作の対象となる共通情報を含む前記ソフト部分を前記主記憶手段に要求して、前記二つのコアのうち他のコアが前記読込動作の対象となる共通情報を含む前記ソフト部分と同一の制御モードの前記ソフト部分を実行しているか否かを判定する情報判定手段を含み、
前記情報判定手段が肯定と判定する場合に、前記一つのコアが他の前記副記憶手段が記憶している前記ソフト部分の読込動作を実行すること、
を特徴とする。
In order to solve the above problem, the control device according to the present invention provides:
Main memory means for storing software;
A central processing means including two cores;
Two sub storage means for storing a part of the software corresponding to the two cores;
Including
Of the software, the software portion of each control mode corresponding to all the two secondary storage means includes common information,
When one of the two cores fails in the read operation of reading the soft part including the common information from the corresponding one of the secondary storage units,
The one secondary storage means requests the soft part including the common information that is the target of the read operation to the main memory means, and the other core of the two cores is the target of the read operation. Including information determining means for determining whether or not the software part in the same control mode as the software part is executed,
When the information determination unit determines affirmative, the one core performs an operation of reading the software portion stored in the other secondary storage unit;
It is characterized by.

なお、前記主記憶手段とは典型的には主メモリつまりROMであり、前記副記憶手段とは典型的にはキャッシュであり、前記中央演算処理手段とは典型的にはCPUであり、前記情報判定手段とは典型的にはアドレス判断回路により構成される。   The main storage means is typically a main memory or ROM, the secondary storage means is typically a cache, the central processing means is typically a CPU, and the information The determination means is typically composed of an address determination circuit.

また、前記ソフトとは、個々のプログラムを構成するコードの全体又は一部の集合を示し、前記ソフト部分とは各制御モードで定義されて前記共通情報を有するプログラムのコードの全体又は一部の集合を示す。例えば前記制御装置を適用する車両がHV車であれば、モータ用、発電機用、共通用のプログラムのコードが正弦波モード、過変調モード、矩形波モードのそれぞれの制御モード毎に存在し、プログラムのコードのそれぞれが共通用であれば、共通情報を含めて、モータ用、発電機用のプログラムのコードと識別可能とする。   The software indicates a set of all or a part of code constituting each program, and the software part is defined by each control mode and includes all or a part of the code of the program having the common information. Indicates a set. For example, if the vehicle to which the control device is applied is an HV vehicle, motor, generator, and common program codes exist for each control mode of the sine wave mode, overmodulation mode, and rectangular wave mode, If each of the program codes is for common use, it can be identified from the program codes for the motor and generator including common information.

本発明に係わる前記制御装置によれば、前記コアが対応する一の前記副記憶手段に前記主記憶手段からあらかじめリロードされている前記共通情報を含む前記ソフト部分つまりプログラムのコードを読み込むために前記副記憶手段にアクセスして、読込動作の対象となる前記ソフト部分が存在しないキャッシュミスが発生した場合において、他の前記副記憶手段にリロードされて記憶されている前記共通情報を含む前記ソフト部分を前記コアが読み込み、実行することができるので、キャッシュミスが発生した場合に前記コアから前記主記憶手段に読込動作を行うことに比べて、アクセスを高速化し、処理時間を高速化することができる。   According to the control device of the present invention, the software portion including the common information that has been reloaded from the main storage means in advance to the secondary storage means to which the core corresponds is read in order to read the program code. The soft part including the common information reloaded and stored in another secondary storage means when a cache miss occurs in which the soft part that is the target of the read operation does not exist by accessing the secondary storage means Can be read and executed by the core, so that when a cache miss occurs, the access can be speeded up and the processing time can be speeded up compared with the case where the core performs a read operation from the core. it can.

また、前記副記憶手段が前記共通情報を含む前記ソフト部分を要求し、前記他のコアが前記共通情報を含む前記ソフトと同一の制御モードの前記ソフト部分を実行しているか否かを前記情報判定手段が判定して、肯定と判定されて、前記他のコアの実行している制御モードを予め知覚した上で、他の前記副記憶手段にリロードされた前記共通情報を含む前記ソフト部分を前記コアが読込むこととしているので、他の前記副記憶手段に前記共通情報を含む前記ソフト部分がリロードされている確率を高めて、前記コアが他の前記副記憶手段にアクセスするにあたってのキャッシュミスをも防止することができる。   Further, the information as to whether the secondary storage unit requests the software part including the common information and the other core is executing the software part in the same control mode as the software including the common information. The soft part including the common information reloaded to the other secondary storage means after preliminarily perceiving the control mode being executed by the other core when the judgment means judges and is judged as affirmative. Since the core reads the cache, the probability that the software part including the common information is reloaded in the other secondary storage means is increased, and the core accesses the other secondary storage means. Mistakes can also be prevented.

さらに、前記制御装置は、
前記二つのコアの双方が高負荷処理状態であるか否かを判定する処理判定手段を含み、
前記処理判定手段が前記二つのコアの双方が高負荷処理状態であると判定する場合に、前記主記憶手段の記憶する前記共通情報を含む前記ソフトを、前記二つの副記憶手段が分担し記憶する、
ことを特徴とすることが好ましい。
Furthermore, the control device comprises:
Including a process determination means for determining whether both of the two cores are in a high-load processing state;
When the processing determination unit determines that both of the two cores are in a high load processing state, the two sub storage units share and store the software including the common information stored in the main storage unit. To
It is preferable to be characterized by this.

なお、前記処理判定手段は、例えば制御モードモニタ回路により構成する。また、前述した正弦波モード、過変調モード、矩形波モードにおいては、矩形波モードが前記高負荷処理状態に該当する。   The process determining means is constituted by, for example, a control mode monitor circuit. In the sine wave mode, overmodulation mode, and rectangular wave mode described above, the rectangular wave mode corresponds to the high load processing state.

前記制御装置によれば、処理負荷の厳しい前記高負荷処理状態の制御モードを実現する前記ソフトの前記共通情報を、前記二つのコアにそれぞれ対応する二つの前記副記憶手段に分担してリロードすることとなるので、二つの前記副記憶手段のトータルの容量を小さくした上で、制御モード全体を前記副記憶手段上に載せて、高速処理を実現することができる。   According to the control device, the common information of the software that realizes the control mode of the high-load processing state having a severe processing load is shared and reloaded to the two secondary storage units respectively corresponding to the two cores. Therefore, it is possible to achieve high-speed processing by reducing the total capacity of the two secondary storage means and mounting the entire control mode on the secondary storage means.

本発明によれば、より適切にキャッシュを有効活用することを実現できる制御装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the control apparatus which can implement | achieve effectively using a cache more appropriately can be provided.

本発明に係る制御装置の一実施形態を示すブロック図である。It is a block diagram which shows one Embodiment of the control apparatus which concerns on this invention. 本発明に係る制御装置の一実施形態が使用するマップを示す模式図である。It is a schematic diagram which shows the map which one Embodiment of the control apparatus which concerns on this invention uses. 本発明に係る制御装置の一実施形態が使用する共線図を示す模式図である。It is a schematic diagram which shows the alignment chart which one Embodiment of the control apparatus which concerns on this invention uses. 本発明に係る制御装置の一実施形態におけるリロード形態を示す模式図である。It is a schematic diagram which shows the reload form in one Embodiment of the control apparatus which concerns on this invention. 本発明に係る制御装置の一実施形態の制御内容を示すフローチャートである。It is a flowchart which shows the control content of one Embodiment of the control apparatus which concerns on this invention.

以下、本発明を実施するための形態について、添付図面を参照しながら説明する。図1は、本発明に係わる車両制御装置の一実施形態を機能ブロック的に示す模式図である。図2は、本発明に係わる車両制御装置の一実施形態が用いるNTマップ(回転数NとトルクTの関係)を示す模式図である。図3は、本発明に係わる車両制御装置の一実施形態が用いる共線図を示す模式図である。図4は、本発明に係わる車両制御装置の一実施形態における副記憶手段のリロード形態を示す模式図である。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the accompanying drawings. FIG. 1 is a schematic diagram functionally showing an embodiment of a vehicle control device according to the present invention. FIG. 2 is a schematic diagram showing an NT map (relationship between the rotational speed N and the torque T) used by an embodiment of the vehicle control apparatus according to the present invention. FIG. 3 is a schematic diagram showing an alignment chart used by one embodiment of the vehicle control device according to the present invention. FIG. 4 is a schematic diagram showing a reload form of the secondary storage means in one embodiment of the vehicle control apparatus according to the present invention.

本実施例の車両制御装置(1)は、マイクロコンピュータ(2)と、ROM(3)と、アドレス判断回路(5)と、アドレス判断回路(6)と、キャッシュ1(7)と、キャッシュ2(8)と、CPUコア1(9)と、CPUコア2(10)と、周辺IO(11)と、周辺IO(12)と、モータ1(13)と、モータ2(14)と、制御モードモニタ回路(15)と、現回転数モニタ回路(16)とを含む。図1における白抜きの矢印及び実線の矢印は、上述した構成要素間を相互に接続するデータバス又は配線を示す。   The vehicle control device (1) of this embodiment includes a microcomputer (2), a ROM (3), an address determination circuit (5), an address determination circuit (6), a cache 1 (7), and a cache 2 (8), CPU core 1 (9), CPU core 2 (10), peripheral IO (11), peripheral IO (12), motor 1 (13), motor 2 (14), control A mode monitor circuit (15) and a current rotational speed monitor circuit (16) are included. A white arrow and a solid arrow in FIG. 1 indicate data buses or wirings that interconnect the above-described components.

ここで、車両制御装置(1)は本発明の制御装置を構成する。ROM(3)は主記憶手段を構成する。CPUコア1(9)と、CPUコア2(10)とはともにコアを構成し、キャッシュ1(7)と、キャッシュ2(8)と、CPUコア1(9)はともに副記憶手段を構成する。CPUコア1(9)とキャッシュ1(7)と、CPUコア2(10)とキャッシュ2(8)と、周辺IO(11)(12)で中央演算処理手段を構成する。   Here, the vehicle control device (1) constitutes the control device of the present invention. ROM (3) constitutes a main storage means. The CPU core 1 (9) and the CPU core 2 (10) together constitute a core, and the cache 1 (7), the cache 2 (8), and the CPU core 1 (9) together constitute a secondary storage unit. . The CPU core 1 (9), the cache 1 (7), the CPU core 2 (10), the cache 2 (8), and the peripheral IO (11) (12) constitute central processing means.

アドレス判断回路(5)(6)と、制御モードモニタ回路(15)と、現回転数モニタ回路(16)は、マイクロコンピュータ(2)が所定のプログラムを実行することにより実現される機能ブロックであり、アドレス判断回路(5)(6)は、情報判定手段を構成し、制御モードモニタ回路(15)は、処理判定手段を構成する。   The address determination circuits (5) and (6), the control mode monitor circuit (15), and the current rotational speed monitor circuit (16) are functional blocks realized by the microcomputer (2) executing a predetermined program. Yes, the address determination circuits (5) and (6) constitute an information determination means, and the control mode monitor circuit (15) constitutes a process determination means.

ROM(3)は、モータ1(13)を制御するための、正弦波MG1用情報を含むプログラムと、過変調MG1用情報を含むプログラムと、矩形波MG1用情報を含むプログラムと、モータ2(14)を制御するための、正弦波MG2用情報を含むプログラムと、過変調MG2用情報を含むプログラムと、矩形波MG2用情報を含むプログラムと、モータ1(13)とモータ2(14)とで共通して使用される、正弦波共通情報を含むプログラムと、過変調共通情報を含むプログラムと、矩形波共通情報を含むプログラムがそれぞれ、コンパイル時においてプログラム毎に割り当てられたアドレスを有するメモリ領域に分割してロードされる。   The ROM (3) controls the motor 1 (13), includes a program including information for sine wave MG1, a program including information for overmodulation MG1, a program including information for rectangular wave MG1, and a motor 2 ( 14), a program including information for sine wave MG2, a program including information for overmodulation MG2, a program including information for rectangular wave MG2, and a motor 1 (13) and a motor 2 (14). A memory area having an address assigned to each program at the time of compilation of a program including sine wave common information, a program including overmodulation common information, and a program including rectangular wave common information, which are used in common It is divided and loaded.

制御モードモニタ回路(15)はモータ1(13)及びモータ2(14)を制御する図示しないインバータが備える電流計と電圧計からモータ電流と、システム電圧を取得して、現回転数モニタ回路(16)は、モータ1(13)及びモータ2(14)がそれぞれ備える図示しないレゾルバからレゾルバ角情報を取得して、現回転数を演算して制御モードモニタ回路(15)に出力する。制御モードモニタ回路(15)は、目標トルク、システム電圧、モータ電流、現回転数、図2に示すNTマップを元に、モータ1(13)及びモータ2(14)のそれぞれの制御モードを判断する。   The control mode monitor circuit (15) acquires a motor current and a system voltage from an ammeter and a voltmeter included in an inverter (not shown) that controls the motor 1 (13) and the motor 2 (14), and obtains a current rotational speed monitor circuit ( 16) obtains resolver angle information from a resolver (not shown) included in each of the motor 1 (13) and the motor 2 (14), calculates the current rotational speed, and outputs it to the control mode monitor circuit (15). The control mode monitor circuit (15) determines each control mode of the motor 1 (13) and the motor 2 (14) based on the target torque, the system voltage, the motor current, the current rotation speed, and the NT map shown in FIG. To do.

すなわち、ROM(3)にロードされるソフトすなわちプログラムのコードの集合のうち、二つの副記憶手段つまりはキャッシュ1(7)とキャッシュ2(8)の全てに対応するソフト部分を構成するプログラムのコードが、正弦波共通情報、過変調共通情報、矩形波共通情報すなわち共通情報を含むこととする。   That is, among the code of software, that is, the program loaded into the ROM (3), two sub-storage means, that is, programs constituting the software part corresponding to all of the cache 1 (7) and the cache 2 (8). The code includes sine wave common information, overmodulation common information, rectangular wave common information, that is, common information.

さらに、二つのCPUコア1(9)及びCPUコア2(10)のうち一のCPUコア1(9)が、対応する一のキャッシュ1(7)から共通情報を含むソフト部分すなわちプログラムのコードを読み込む読込動作を失敗してキャッシュミスが発生した場合に、アドレス判断回路(5)(6)が、キャッシュ1(7)及びキャッシュ2(8)のアドレス要求状況と、制御モードモニタ回路(15)の判断に基づいて、キャッシュ1(7)が共通情報を含むプログラムのコードをROM(3)に要求して、二つのCPUコア1(9)及びCPUコア2(10)のうち他のCPUコア2(10)が要求したプログラムと同一の制御モードの共通情報を含むプログラムのコードを実行しているか否かを判定する。   Further, one of the two CPU cores 1 (9) and 2 (10) has one CPU core 1 (9) that receives a software part including common information from a corresponding cache 1 (7), that is, a program code. If a read miss operation fails and a cache miss occurs, the address determination circuits (5) and (6) send the address request statuses of the cache 1 (7) and cache 2 (8) and the control mode monitor circuit (15). Based on the determination, the cache 1 (7) requests the ROM (3) for the code of the program including the common information, and the other CPU core among the two CPU cores 1 (9) and 2 (10). 2 (10) determines whether the code of the program including the common information of the same control mode as the requested program is being executed.

アドレス判断回路(5)(6)が、キャッシュ1(7)が共通情報を含むプログラムをROM(3)に要求して、二つのCPUコア1(9)及びCPUコア2(10)のうち他のCPUコア2(10)が、CPUコア1(9)がキャッシュ1(7)に対して要求したプログラムのコードと同一の制御モードの共通情報を含むプログラムのコードを実行しているかの、両条件が成立して、肯定と判定する場合には、一つのCPUコア1(9)が他のキャッシュ2(8)からキャッシュ2(8)が記憶している共通情報を含むプログラムのコードの読込動作を実行する。   The address determination circuits (5) and (6) request the ROM (3) for a program in which the cache 1 (7) includes common information, and the other of the two CPU cores 1 (9) and 2 (10). CPU core 2 (10) is executing program code including common information in the same control mode as the program code requested by CPU core 1 (9) to cache 1 (7). If the condition is satisfied and the determination is affirmative, one CPU core 1 (9) reads the program code including the common information stored in the cache 2 (8) from the other cache 2 (8). Perform the action.

制御モードモニタ回路(15)は、図2に示すNTマップと、図3に示す動力分割機構THSの共線図の状態遷移を元に、二つのCPUコア1(9)及びCPUコア2(10)の双方が高負荷処理状態すなわち矩形波制御モードであるか否かを判定し、肯定と判定する場合に、ROM(3)の記憶する矩形波用共通情報を含む制御モードのプログラムのコードの全てを、図4に示すように、キャッシュ1(7)及びキャッシュ2(8)に分担しリロードさせて記憶させる。   The control mode monitor circuit (15) has two CPU cores 1 (9) and 2 (10) based on the state transitions of the NT map shown in FIG. 2 and the alignment chart of the power split mechanism THS shown in FIG. ) Is in the high load processing state, that is, the rectangular wave control mode, and if it is determined to be affirmative, the code of the control mode program including the rectangular wave common information stored in the ROM (3) As shown in FIG. 4, all of them are shared and reloaded and stored in the cache 1 (7) and the cache 2 (8).

以下に以上述べた本実施例の車両制御装置(1)の制御内容を、フローチャートを用いて説明する。図5は、本発明に係わる車両制御装置(1)の制御内容を示すフローチャートである。   The control content of the vehicle control apparatus (1) of the present embodiment described above will be described using a flowchart. FIG. 5 is a flowchart showing the control contents of the vehicle control apparatus (1) according to the present invention.

図5に示すように、ステップS1において、制御モードモニタ回路(15)は、CPUコア1(9)及びCPUコア2(10)の制御モードが、図2に示した正弦波モード、過変調モード、矩形波モードのいずれであるかを判断し、ステップS2において、制御モードモニタ回路(15)は、CPUコア1(9)及びCPUコア2(10)のいずれかが矩形波モードつまり高負荷処理状態であるか否かを判定し、肯定である場合にはステップS3にすすみ、否定である場合には、ステップS9にすすむ。   As shown in FIG. 5, in step S1, the control mode monitor circuit (15) determines that the control modes of the CPU core 1 (9) and the CPU core 2 (10) are the sine wave mode and overmodulation mode shown in FIG. In step S2, the control mode monitor circuit (15) determines that either the CPU core 1 (9) or the CPU core 2 (10) is in the rectangular wave mode, that is, the high load processing. It is determined whether or not it is a state. If the result is affirmative, the process proceeds to step S3. If the result is negative, the process proceeds to step S9.

ステップS3において、制御モードモニタ回路(15)から、ROM(3)に対して、キャッシュ1(7)及びキャッシュ2(8)に対してキャッシュリロード指示を実行し、ステップS4において、キャッシュ1(7)及びキャッシュ2(8)のそれぞれは、個別のコードをリロードし、図1に示した、正弦波共通情報、過変調共通情報、矩形波共通情報すなわち共通情報を含むコードが記憶されるROM(3)内の共通部にアクセスして、記憶されているコードを、キャッシュ1(7)及びキャッシュ2(8)のそれぞれに、図4に示すように前半と後半を分担させてリロードする。   In step S3, a cache reload instruction is executed from the control mode monitor circuit (15) to the cache (1) to the cache (1) to the cache (1), and to the cache (2) in step S4. ) And the cache 2 (8) are reloaded with individual codes, and the ROM (FIG. 1) storing codes including sine wave common information, overmodulation common information, rectangular wave common information, that is, common information is stored. 3) Access the common part in FIG. 4 and reload the stored code in the cache 1 (7) and the cache 2 (8), sharing the first half and the second half as shown in FIG.

ステップS5において、一のCPUコア1(9)から対応するキャッシュ1(7)に対してキャッシュアクセスを行い、ステップS6においてキャッシュミスが発生したか否かを判定し、否定であればステップS7にすすみ、自キャッシュであるキャッシュ1(7)をアクセスして、制御上必要なプログラムのコードを取得して、処理を実行する。   In step S5, one CPU core 1 (9) performs cache access to the corresponding cache 1 (7). In step S6, it is determined whether or not a cache miss has occurred. Then, the cache 1 (7), which is its own cache, is accessed to acquire the code of the program necessary for control, and the process is executed.

ステップS8において、一のCPUコア1(9)は、他キャッシュであるキャッシュ2(8)にアクセスして、制御上必要なプログラムのコードを取得して処理を実行する。   In step S8, one CPU core 1 (9) accesses the cache 2 (8), which is another cache, acquires the code of a program necessary for control, and executes the process.

ステップS9において、一のCPUコア1(9)は自キャッシュであるキャッシュ1(7)にキャッシュアクセスを実行し、ステップS10において、キャッシュミスが発生したか否かを判定し、肯定であれば、ステップS11にすすみ、否定であれば、ステップS14にすすむ。   In step S9, one CPU core 1 (9) performs cache access to its own cache 1 (7). In step S10, it is determined whether or not a cache miss has occurred. Proceed to step S11, and if negative, proceed to step S14.

ステップS11において、制御モードモニタ回路(15)は他コアであるCPUコア2(10)がCPUコア1(9)と同一の制御モードのプログラムのコードを実行しているか否かを判定し、肯定であればステップS12にすすみ、否定であればステップS13にすすむ。   In step S11, the control mode monitor circuit (15) determines whether the CPU core 2 (10), which is another core, is executing the code of the program in the same control mode as the CPU core 1 (9). If so, the process proceeds to step S12, and if not, the process proceeds to step S13.

ステップS12において、CPUコア1(9)は他キャッシュであるキャッシュ2(8)をアクセスして、処理を実行し、ステップS13において、CPUコア1(9)は、主メモリであるROM(3)から制御に必要なプログラムのコードを読込処理することを実行する。ステップS14においては、CPUコア1(9)は自キャッシュであるキャッシュ1(7)をアクセスして、処理を実行する。   In step S12, the CPU core 1 (9) accesses the cache 2 (8), which is another cache, and executes processing. In step S13, the CPU core 1 (9) is the ROM (3) that is the main memory. The program code required for control is read from and executed. In step S14, the CPU core 1 (9) accesses the cache 1 (7), which is its own cache, and executes processing.

これらの制御内容により実現される本実施例の車両制御装置(1)によれば、以下のような作用効果を得ることができる。すなわち、CPUコア1(9)が対応するキャッシュ1(7)にROM(3)からあらかじめリロードされている共通情報を含むソフト部分つまりプログラムのコードを読み込むために、自キャッシュであるキャッシュ1(7)にアクセスしてキャッシュミスが発生した場合において、他キャッシュであるキャッシュ2(8)にリロードされた共通情報を含むソフト部分のコードをCPUコア1(9)が読み込み、実行することができるので、他キャッシュであるキャッシュ2(8)を用いてバックアップ性を高めることができる。   According to the vehicle control device (1) of the present embodiment realized by these control contents, the following operational effects can be obtained. That is, in order to read the software part including the common information reloaded from the ROM (3) in advance into the corresponding cache 1 (7) to the corresponding cache 1 (9), that is, the program code, the cache 1 (7) which is its own cache ), The CPU core 1 (9) can read and execute the code of the software part including the common information reloaded in the cache 2 (8), which is another cache, when a cache miss occurs. The backup performance can be improved by using the cache 2 (8) which is another cache.

これとともに、キャッシュミスが発生した場合においても、CPUコア1(9)がキャッシュ1(7)よりも離隔して位置するROM(3)に読込動作を行うことに比べて、より近接した位置に位置するキャッシュ2(8)にアクセスすることとしているので、アクセスを高速化し、読込動作に必要な処理時間を高速化することができる。   At the same time, even when a cache miss occurs, the CPU core 1 (9) is located closer to the ROM (3) than the cache 1 (7). Since access is made to the cache 2 (8), the access can be speeded up and the processing time required for the read operation can be speeded up.

加えて、キャッシュ1(7)が共通情報を含むプログラムのコードをROM(3)に要求し、他のキャッシュ2(8)が共通情報を含むプログラムのコードと同一の制御モードのプログラムのコードを実行しているか否かを制御モードモニタ回路(15)により判定させて、肯定と判定された場合において、他のCPUコア2(10)の実行している制御モードを予め知覚した上で、CPUコア1(9)が他キャッシュであるキャッシュ2(8)にアクセスして、キャッシュ2(8)にリロードされて記憶された共通情報を含むプログラムのコードをCPUコア(9)が読込むこととしているので、他キャッシュであるキャッシュ2(8)に共通情報を含むプログラムのコードがリロードされている確率を高めて、CPUコア1(9)がキャッシュ2(8)にアクセスするにあたってのキャッシュミスをも防止することができる。   In addition, the cache 1 (7) requests the program code including the common information from the ROM (3), and the other cache 2 (8) transmits the code of the program in the same control mode as the program code including the common information. Whether or not it is being executed is determined by the control mode monitor circuit (15), and if it is determined as affirmative, the CPU is aware of the control mode being executed by another CPU core 2 (10) in advance, and then the CPU The core 1 (9) accesses the cache 2 (8), which is another cache, and the CPU core (9) reads the code of the program including the common information reloaded and stored in the cache 2 (8). Therefore, the probability that the code of the program including common information is reloaded in the cache 2 (8), which is another cache, is increased, and the CPU core 1 (9) is cached. It is possible to prevent a cache miss when accessing the shoe 2 (8).

また、単にバックアップを目的として、常に他キャッシュであるキャッシュ2(8)に共通情報を含むプログラムのコードを、ROM(3)からリロードさせて待機保持させた場合には、キャッシュ2(8)は対応するCPUコア2(10)が実行するある制御モードのプログラムのコード以外、すなわち他の制御モードのプログラムをも保持する必要が生じて、容量増大を招いてしまうことに比べて、本実施例の車両制御装置(1)においては、CPUコア1(9)が他キャッシュであるキャッシュ2(8)にアクセスするケースを、CPUコア2(10)がCPUコア1(9)と同一の制御モードを実行しているケースに絞り込むことにより、キャッシュ2(8)に要求される記憶容量を制限してコストダウンを図ることができる。   If the program code including common information is always reloaded from the ROM (3) and held on standby for the purpose of backup only, the cache 2 (8) is always stored in the cache 2 (8). Compared with the case where the code of a certain control mode program executed by the corresponding CPU core 2 (10), that is, a program in another control mode needs to be held, and this causes an increase in capacity. In the vehicle control apparatus (1), the CPU core 1 (9) accesses the cache 2 (8), which is another cache, and the CPU core 2 (10) has the same control mode as the CPU core 1 (9). By narrowing down to the cases where the process is executed, the storage capacity required for the cache 2 (8) can be limited to reduce the cost.

さらに、本実施例の車両制御装置(1)においては、制御モードモニタ回路(15)が、CPUコア1(9)とCPUコア2(10)の双方が高負荷処理状態であるか否かを判定した上で、肯定であると判定される場合に、ROM(3)の記憶する共通情報を含むプログラムのコードの全てを、キャッシュ1(7)及びキャッシュ(8)の双方に分担させてリロードして記憶させることとしているので、更に以下のような有利な作用効果を得ることができる。   Further, in the vehicle control device (1) of this embodiment, the control mode monitor circuit (15) determines whether or not both the CPU core 1 (9) and the CPU core 2 (10) are in a high load processing state. If it is determined that the determination is affirmative, all of the code of the program including the common information stored in the ROM (3) is shared by both the cache 1 (7) and the cache (8) and reloaded. Therefore, the following advantageous effects can be obtained.

すなわち、処理負荷の厳しい状態である、高負荷処理状態の制御モード、共通情報を含む矩形波モードを実現するプログラムのコードの共通情報を、CPUコア1(9)及びCPUコア2(10)にそれぞれ対応する二つのキャッシュ1(7)及びキャッシュ2(8)に分担してリロードすることとなるので、キャッシュ1(7)及びキャッシュ2(8)のトータルとしての記憶容量を小さくしてコストダウンを実現した上で、制御モードを実現するプログラムのコード全体をキャッシュ1(7)及びキャッシュ2(8)上に載せて、制御に必要なプログラムのコードをCPUコア1(9)及びCPUコア2(10)により近接した位置に保持することができるので、アクセス及び読込、実行に要する時間を短縮して、高速処理を実現することができる。   That is, the CPU core 1 (9) and the CPU core 2 (10) share the common information of the program code for realizing the control mode in the high load processing state, which is a severe processing load state, and the rectangular wave mode including the common information. Since each of the two corresponding caches 1 (7) and 2 (8) is reloaded, the total storage capacity of the cache 1 (7) and the cache 2 (8) is reduced to reduce the cost. , The entire code of the program for realizing the control mode is put on the cache 1 (7) and the cache 2 (8), and the code of the program necessary for control is stored in the CPU core 1 (9) and the CPU core 2 (10) Since it can be held at a closer position, the time required for access, reading, and execution can be shortened to realize high-speed processing. Can.

すなわち、本実施例の車両制御装置(1)においては、主メモリであるROM(3)に比べて、高価かつ高速であるという特性を有する、キャッシュ1(7)及びキャッシュ2(8)を備えて、二つのコアであるCPUコア1(9)及びCPUコア2(10)を備えたマルチCPUコアの構成を採用した場合おいても、キャッシュ1(7)及びキャッシュ2(8)をより適切に有効活用することを実現することができる。   That is, the vehicle control device (1) of the present embodiment includes the cache 1 (7) and the cache 2 (8), which have the characteristics of being expensive and faster than the ROM (3) as the main memory. Even when a multi-CPU core configuration including two cores, the CPU core 1 (9) and the CPU core 2 (10), is adopted, the cache 1 (7) and the cache 2 (8) are more appropriate. Can be effectively utilized.

以上本発明の好ましい実施例について詳細に説明したが、本発明は上述した実施例に制限されることなく、本発明の範囲を逸脱することなく、上述した実施例に種々の変形および置換を加えることができる。   Although the preferred embodiments of the present invention have been described in detail above, the present invention is not limited to the above-described embodiments, and various modifications and substitutions are made to the above-described embodiments without departing from the scope of the present invention. be able to.

例えば上述した実施例においては、一のコアをCPUコア1(9)として説明したが、CPUコア2(10)を一のコアとしても、他キャッシュであるキャッシュ1(7)からバックアップ的に共通情報を有するプログラムのコードを取得し、高負荷処理状態においては、共通情報を有するプログラムのコードを、キャッシュ1(7)及びキャッシュ2(8)の双方に分担させてリロードすることを同様に実行することができる。   For example, in the embodiment described above, one core has been described as the CPU core 1 (9). However, even if the CPU core 2 (10) is used as one core, it is common as a backup from the cache 1 (7), which is another cache. The code of the program having the information is acquired, and in the high load processing state, the code of the program having the common information is shared by both the cache 1 (7) and the cache 2 (8) and reloaded in the same manner can do.

本発明の制御装置によれば、複数のキャッシュをより適切に有効活用することを可能とすることができ、キャッシュの記憶容量を制限してコストダウンを図り、CPUの処理時間の短縮化と高速化を図ることができるので、乗用車、トラック、バス等の様々な車両に適用して有益なものである。   According to the control device of the present invention, a plurality of caches can be more effectively used effectively, the storage capacity of the cache is limited, the cost is reduced, the processing time of the CPU is shortened, and the speed is increased. Therefore, the present invention is useful when applied to various vehicles such as passenger cars, trucks, and buses.

1 車両制御装置
2 マイクロコンピュータ
3 ROM
5 アドレス判断回路
6 アドレス判断回路
7 キャッシュ1
8 キャッシュ2
9 CPUコア1
10 CPUコア2
11 周辺IO
12 周辺IO
13 モータ1
14 モータ2
15 制御モードモニタ回路
16 現回転数モニタ回路
1 Vehicle control device 2 Microcomputer 3 ROM
5 Address determination circuit 6 Address determination circuit 7 Cache 1
8 cash 2
9 CPU core 1
10 CPU core 2
11 Peripheral IO
12 Peripheral IO
13 Motor 1
14 Motor 2
15 Control mode monitor circuit 16 Current speed monitor circuit

Claims (2)

ソフトを記憶する主記憶手段と、二つのコアを含む中央演算処理手段と、前記二つのコアに対応して、前記ソフトの一部を記憶する二つの副記憶手段と、を含み、前記ソフトのうち、前記二つの副記憶手段全てに対応する各制御モードのソフト部分が共通情報を含み、前記二つのコアのうち一のコアが、対応する一の前記副記憶手段から前記共通情報を含む前記ソフト部分を読み込む読込動作を失敗した場合に、前記一の副記憶手段が前記読込動作の対象となる共通情報を含む前記ソフト部分を前記主記憶手段に要求して、前記二つのコアのうち他のコアが前記読込動作の対象となる共通情報を含む前記ソフト部分と同一の制御モードの前記ソフト部分を実行しているか否かを判定する情報判定手段を含み、前記情報判定手段が肯定と判定する場合に、前記一つのコアが他の前記副記憶手段が記憶している前記ソフト部分の読込動作を実行すること、を特徴とする制御装置。   Main storage means for storing software, central processing means including two cores, and two secondary storage means for storing a part of the software corresponding to the two cores. Among them, the soft part of each control mode corresponding to all of the two secondary storage means includes common information, and one of the two cores includes the common information from the corresponding one of the secondary storage means. When the reading operation for reading the software part fails, the one secondary storage unit requests the soft part including the common information to be the target of the reading operation from the main storage unit, and the other of the two cores. Including information determining means for determining whether or not the core is executing the software part in the same control mode as the software part including the common information to be read, and the information determining means is determined to be affirmative You Case, performing reading operation of the soft portion where the one core is stored in the other of said secondary storage means, the control apparatus according to claim. 前記二つのコアの双方が高負荷処理状態であるか否かを判定する処理判定手段を含み、前記処理判定手段が前記二つのコアの双方が高負荷処理状態であると判定する場合に、前記主記憶手段の記憶する前記共通情報を含む前記ソフトを、前記二つの副記憶手段が分担し記憶する、ことを特徴とする請求項1に記載の制御装置。   Including a process determining means for determining whether or not both of the two cores are in a high load processing state, and when the process determining means determines that both of the two cores are in a high load processing state, 2. The control device according to claim 1, wherein the two sub storage units share and store the software including the common information stored in a main storage unit.
JP2009007433A 2009-01-16 2009-01-16 Control device Active JP5245848B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009007433A JP5245848B2 (en) 2009-01-16 2009-01-16 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009007433A JP5245848B2 (en) 2009-01-16 2009-01-16 Control device

Publications (2)

Publication Number Publication Date
JP2010165210A true JP2010165210A (en) 2010-07-29
JP5245848B2 JP5245848B2 (en) 2013-07-24

Family

ID=42581308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009007433A Active JP5245848B2 (en) 2009-01-16 2009-01-16 Control device

Country Status (1)

Country Link
JP (1) JP5245848B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63311555A (en) * 1987-06-15 1988-12-20 Fuji Electric Co Ltd Shared data control system for multiprocessor system
JPH01251250A (en) * 1988-03-31 1989-10-06 Mitsubishi Electric Corp Shared cache memory
JPH0474232A (en) * 1990-07-17 1992-03-09 Toshiba Corp Multi-task computer
JP2004246890A (en) * 2003-02-12 2004-09-02 Samsung Electronics Co Ltd Data processing device and computer system
JP2006164082A (en) * 2004-12-09 2006-06-22 Nec Corp File exclusive control processing device and file exclusive control system
JP2007213304A (en) * 2006-02-09 2007-08-23 Seiko Epson Corp Cache memory system and multiprocessor system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63311555A (en) * 1987-06-15 1988-12-20 Fuji Electric Co Ltd Shared data control system for multiprocessor system
JPH01251250A (en) * 1988-03-31 1989-10-06 Mitsubishi Electric Corp Shared cache memory
JPH0474232A (en) * 1990-07-17 1992-03-09 Toshiba Corp Multi-task computer
JP2004246890A (en) * 2003-02-12 2004-09-02 Samsung Electronics Co Ltd Data processing device and computer system
JP2006164082A (en) * 2004-12-09 2006-06-22 Nec Corp File exclusive control processing device and file exclusive control system
JP2007213304A (en) * 2006-02-09 2007-08-23 Seiko Epson Corp Cache memory system and multiprocessor system

Also Published As

Publication number Publication date
JP5245848B2 (en) 2013-07-24

Similar Documents

Publication Publication Date Title
RU2380743C1 (en) Method and device for clearing semaphore reservation
US10747883B2 (en) Collated multi-image check in system-on-chips
EP2880541A1 (en) Systems and methods for controlling access to a shared data structure with reader-writer locks using multiple sub-locks
JPH04246745A (en) Memory access system
US20110246667A1 (en) Processing unit, chip, computing device and method for accelerating data transmission
CN115086438A (en) Task processing method, video processing unit, component and traffic equipment
JP5533789B2 (en) In-vehicle electronic control unit
JP5213485B2 (en) Data synchronization method and multiprocessor system in multiprocessor system
JP5045307B2 (en) Multi-core system, electronic control unit, motor ECU, control system, instruction execution method
US20080184258A1 (en) Data processing system
US11221899B2 (en) Efficient memory utilisation in a processing cluster having a split mode and a lock mode
JP5245848B2 (en) Control device
JP5790514B2 (en) Electronic equipment
JP5239890B2 (en) Control device
US11640321B2 (en) Method and apparatus for memory allocation in a multi-core processor system, and recording medium therefor
JP2022102142A (en) Control system, mobile object, control method, and program
CN112637201A (en) Request processing method, device, equipment and system of web server
JP2008262340A (en) Automatic code generating device for dual core
JP2003280902A (en) Microcomputer logic development system and its program
WO2013057825A1 (en) Information processing device, data management method, data management program
JP5347544B2 (en) Semiconductor integrated circuit
CN103885824A (en) Interface control circuit, equipment and identification switching method
US20220269546A1 (en) Control device, method, program, and vehicle
US20240134674A1 (en) Information processing device, vehicle, information processing method, and recording medium on which a program is recorded
CN114368371B (en) Braking power distribution method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110421

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130115

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130212

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: 20130312

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130325

R151 Written notification of patent or utility model registration

Ref document number: 5245848

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160419

Year of fee payment: 3