JP2018132914A - Information processing apparatus - Google Patents

Information processing apparatus Download PDF

Info

Publication number
JP2018132914A
JP2018132914A JP2017025566A JP2017025566A JP2018132914A JP 2018132914 A JP2018132914 A JP 2018132914A JP 2017025566 A JP2017025566 A JP 2017025566A JP 2017025566 A JP2017025566 A JP 2017025566A JP 2018132914 A JP2018132914 A JP 2018132914A
Authority
JP
Japan
Prior art keywords
mode
processor
function unit
processing apparatus
information processing
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
JP2017025566A
Other languages
Japanese (ja)
Inventor
善和 渡邉
Yoshikazu Watanabe
善和 渡邉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2017025566A priority Critical patent/JP2018132914A/en
Publication of JP2018132914A publication Critical patent/JP2018132914A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To suppress adding parts for recording trace information of a control apparatus.SOLUTION: An information processing apparatus executes a predetermined control program for realizing control to a control target in a first mode, and executes a pseudo program for simulating operation of the control program in a second mode. The information processing apparatus comprises a read only memory for storing the control program, a random access memory for holding the pseudo program in the second mode, a processor for executing the control program of the read only memory in the first mode and executing the pseudo program of the random access memory in the second mode, and a debugging function unit for acquiring trace information indicating the operation of the processor and recording the same in the random access memory in the first mode and acquiring the trace information and outputting the same to an external debugging apparatus in the second mode.SELECTED DRAWING: Figure 2

Description

制御装置における情報処理装置の動作をトレース情報として蓄積する技術に関する。   The present invention relates to a technique for accumulating the operation of an information processing device in a control device as trace information.

近年、自動車の制御は複雑化している。そのため複雑な制御をマイコンにより実現するECU(Eletric Conrotol Unit)が多くの自動車に搭載されている。ECUでは、自動車の様々な制御がソフトウェアとしてプログラミングされており、プロセッサでそのソフトウェアプログラムを実行する。ECUには自動車から様々な情報が入力され、それを基に自動車に対して状況に応じた複雑な制御を行っている。   In recent years, the control of automobiles has become complicated. Therefore, an ECU (Electric Control Unit) that realizes complicated control by a microcomputer is installed in many automobiles. In the ECU, various controls of the automobile are programmed as software, and the processor executes the software program. Various information is input to the ECU from the automobile, and based on the information, complicated control is performed on the automobile according to the situation.

市場に出ると自動車は様々な状況に使用されるのでECUに入力される情報も様々に変化する。そのため、市場に出た自動車に搭載されているECUのマイコンが何らかの誤動作を起こした場合にその原因を特定するのは容易ではない。誤動作時のマイコンの動作を解析しようとしても誤動作を再現することができず、解析ができない場合もある。ECUの誤動作の原因特定は多大な労力と時間を要する作業となっている。   When entering the market, automobiles are used in various situations, so the information input to the ECU also changes in various ways. For this reason, it is not easy to identify the cause when an ECU microcomputer mounted on an automobile on the market has some sort of malfunction. Even if it tries to analyze the operation of the microcomputer at the time of malfunction, the malfunction cannot be reproduced and the analysis may not be possible. Identification of the cause of the malfunction of the ECU is a work that requires a lot of labor and time.

誤動作の解消は、市場で誤動作が発生する条件を絞り込んでいくことで誤動作の原因を特定し、その条件において誤動作が発生しないように、誤動作の原因に対する恒久的な対策を実施する。しかし、市場では想定外の条件が積み重なって誤動作を生じさせている場合が多く、誤動作を発生させる条件を絞り込む調査に膨大な時間を費やしている。   To eliminate malfunctions, narrow down the conditions under which malfunctions occur in the market, identify the causes of malfunctions, and implement permanent measures against the causes of malfunctions so that malfunctions do not occur under those conditions. However, in the market, unexpected conditions often accumulate and cause malfunctions, and a great deal of time is spent investigating the conditions that cause malfunctions.

どのような条件が積み重なって誤動作に至ったかは誤動作が生じたときの状況だけから特定するのは難しい。そのため、ECU内にメモリを内蔵し、マイコンの動作をトレース情報として継続的にメモリに蓄積する技術が特許文献1に開示されている。   It is difficult to identify what conditions have accumulated and led to a malfunction only from the situation when the malfunction occurred. For this reason, Patent Document 1 discloses a technique in which a memory is built in the ECU and the operation of the microcomputer is continuously stored in the memory as trace information.

特許文献1の技術を用いれば、時間経過に伴うマイコンの動作を示すトレース情報がメモリに蓄積されるので、誤動作が生じたときに、その誤動作の原因の特定に役立てることができる。   If the technique of Patent Document 1 is used, trace information indicating the operation of the microcomputer over time is accumulated in the memory, so that when a malfunction occurs, it can be used to identify the cause of the malfunction.

特開平8−95945号公報Japanese Patent Laid-Open No. 8-95945

しかしながら、特許文献1の技術では、トレース結果を格納するためのメモリをECUに新たに追加搭載する必要がある。そのためメモリの追加によりECUが大型化し、コスト高になってしまうという問題がある。   However, in the technique of Patent Document 1, it is necessary to newly install a memory for storing the trace result in the ECU. For this reason, there is a problem in that the addition of the memory increases the size of the ECU and increases the cost.

本発明は、制御装置のトレース情報を記録するための部品追加を抑制する技術を提供することである。   The present invention is to provide a technique for suppressing the addition of components for recording trace information of a control device.

本発明の一態様による情報処理装置は、第1モードでは制御対象への制御を実現する所定の制御プログラムを実行し、第2モードでは前記制御プログラムの動作を疑似する疑似プログラムを実行する情報処理装置であって、前記制御プログラムを格納するリードオンリメモリと、前記第2モードにおいて前記疑似プログラムを保持するランダムアクセスメモリと、第1モードでは前記リードオンリメモリの前記制御プログラムを実行し、前記第2モードでは前記ランダムアクセスメモリの前記疑似プログラムを実行するプロセッサと、前記第1モードにおいて前記プロセッサの動作を表すトレース情報を取得して前記ランダムアクセスメモリに記録し、前記第2モードにおいて前記トレース情報を取得して外部のデバッグ用装置に出力するデバッグ機能部と、を有している。   An information processing apparatus according to an aspect of the present invention executes an information processing apparatus that executes a predetermined control program that realizes control of a control target in a first mode, and executes a pseudo program that simulates the operation of the control program in a second mode. A read-only memory for storing the control program; a random access memory for holding the pseudo program in the second mode; and the control program for the read-only memory in the first mode. In the second mode, the processor that executes the pseudo program in the random access memory, and the trace information representing the operation of the processor in the first mode is acquired and recorded in the random access memory, and the trace information in the second mode Is obtained and output to an external debugging device. Tsu has a grayed function unit.

開発モード(第2モード)においてプロセッサが実行する疑似プログラムを保持させておくランダムアクセスメモリを、量産モード(第1モード)においてトレース情報を記録するのに利用するので、トレース情報を記録するための部品追加を抑えることができる。   A random access memory that holds a pseudo program executed by the processor in the development mode (second mode) is used to record trace information in the mass production mode (first mode). Addition of parts can be suppressed.

制御装置のソフトウェア開発におけるデバッグ環境を示す図である。It is a figure which shows the debugging environment in the software development of a control apparatus. 本実施形態における制御装置のソフトウェア開発におけるデバッグ環境を示す図である。It is a figure which shows the debugging environment in the software development of the control apparatus in this embodiment. 本実施形態における量産製品の制御装置を示すブロック図である。It is a block diagram which shows the control apparatus of the mass-produced product in this embodiment. 本実施形態におけるデバッグ時の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of debugging in this embodiment.

本発明の実施形態の制御装置について図面を参照して詳細に説明する。本実施形態の制御装置は各種情報を取得し、それらの情報に基づいて制御対象へ制御信号を送信する装置であり、複雑な処理を実行する。そのため、制御装置はマイコンを搭載し、マイクロコンピュータ(以下「マイコン」ともいう)上でプロセッサがソフトウェアプログラムを実行することで複雑な処理を実行している。複雑な処理を実現するソフトウェアにはデバッグが不可欠である。そのため制御装置に搭載されるマイコンにはデバッグ環境が準備されている。   A control apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings. The control device of the present embodiment is a device that acquires various types of information and transmits a control signal to a control target based on the information, and performs complicated processing. For this reason, the control device is equipped with a microcomputer, and the processor executes a software program on the microcomputer (hereinafter also referred to as “microcomputer”) to execute complicated processing. Debugging is essential for software that implements complex processing. Therefore, a debugging environment is prepared for the microcomputer mounted on the control device.

まず制御装置のソフトウェアを開発するためのデバッグ環境について説明する。   First, a debugging environment for developing control unit software will be described.

図1は、制御装置のソフトウェア開発におけるデバッグ環境を示す図である。図1を参照すると、デバッグ環境として、開発対象の制御装置101にはデバッガー109が接続され、更のそのデバッガー109にパーソナルコンピュータ(PC)110が接続されている。   FIG. 1 is a diagram showing a debugging environment in software development of a control device. Referring to FIG. 1, as a debugging environment, a debugger 109 is connected to the control apparatus 101 to be developed, and a personal computer (PC) 110 is connected to the debugger 109.

制御装置101にはマイコン102が搭載されている。マイコン102は、エミュレーションRAM(ERAM)103、フラッシュメモリ(Flash)104、グローバルRAM(Global RAM)105、プロセッサ(CPU)106、EEPROM107、デバッグ機能部108、システムインターコネクト111、フラッシュインタフェース112、周辺バス113、および周辺機能部114を有している。ERAM103、EEPROM107、およびデバッグ機能部108はデバッグ用に設けられた部分である。上述したデバッガー109はデバッグ機能部108に接続されている。   A microcomputer 102 is mounted on the control device 101. The microcomputer 102 includes an emulation RAM (ERAM) 103, a flash memory (Flash) 104, a global RAM (Global RAM) 105, a processor (CPU) 106, an EEPROM 107, a debug function unit 108, a system interconnect 111, a flash interface 112, and a peripheral bus 113. And a peripheral function unit 114. The ERAM 103, the EEPROM 107, and the debug function unit 108 are provided for debugging. The above-described debugger 109 is connected to the debug function unit 108.

プロセッサ106はシステムインターコネクト111に接続されている。システムインターコネクト111にはグローバルRAM105、EEPROM107、フラッシュインタフェース112、周辺バス113、およびデバッグ機能部108が接続されている。   The processor 106 is connected to the system interconnect 111. A global RAM 105, EEPROM 107, flash interface 112, peripheral bus 113, and debug function unit 108 are connected to the system interconnect 111.

プロセッサ106はシステムインターコネクト111を介してグローバルRAM105およびEEPROM107にアクセスすることができる。   The processor 106 can access the global RAM 105 and the EEPROM 107 via the system interconnect 111.

フラッシュインタフェース112にはERAM103およびフラッシュメモリ104が接続されている。プロセッサ106は、システムインターコネクト111およびフラッシュインタフェース112を介してERAM103およびフラッシュメモリ104にアクセス可能である。   An ERAM 103 and a flash memory 104 are connected to the flash interface 112. The processor 106 can access the ERAM 103 and the flash memory 104 via the system interconnect 111 and the flash interface 112.

制御装置101が制御対象(不図示)を制御する量産モードにおいてプロセッサ106が実行する制御プログラムはフラッシュメモリ104に搭載される。制御装置101の量産製品は量産モードである。量産モードでは、プロセッサ106は、フラッシュメモリ104に格納された制御プログラムを実行する。プロセッサ106は、グローバルRAM105を利用しながら制御プログラムを実行する。   A control program executed by the processor 106 in the mass production mode in which the control device 101 controls a control target (not shown) is installed in the flash memory 104. The mass production product of the control device 101 is in the mass production mode. In the mass production mode, the processor 106 executes a control program stored in the flash memory 104. The processor 106 executes the control program while using the global RAM 105.

周辺バス113には複数の周辺機能部114が接続されている。周辺機能部114は、制御装置101の制御に利用される各種機能部である。例えば、周辺機能部114は、制御対象あるいはその周辺に設置されたセンサからのセンサ入力を取得するセンサインタフェースである。センサ入力はセンサで観測された情報を示す入力信号である。あるいは、周辺機能部114は、制御対象への制御出力を送信する制御インタフェースである。制御出力は制御対象に対して指示する制御を示す出力信号である。プロセッサ106は、制御プログラムの処理に応じて適宜、周辺機能部114と信号を送受信する。   A plurality of peripheral function units 114 are connected to the peripheral bus 113. The peripheral function unit 114 is various function units used for control of the control device 101. For example, the peripheral function unit 114 is a sensor interface that acquires sensor inputs from a control target or a sensor installed in the vicinity thereof. The sensor input is an input signal indicating information observed by the sensor. Alternatively, the peripheral function unit 114 is a control interface that transmits a control output to the control target. The control output is an output signal indicating control instructed to the control target. The processor 106 transmits and receives signals to and from the peripheral function unit 114 as appropriate according to the processing of the control program.

制御装置101のソフトウェア開発におけるデバッグ時の用いる開発モードにおいてプロセッサ106が適宜実行する疑似プログラムは、書き換えが容易なERAM103に搭載される。開発時の製品(試作品)は開発モードである。開発モードでは、プロセッサ106は、ERAM103に格納された疑似プログラムを実行する。疑似プログラムは制御プログラムを疑似するソフトウェアプログラムである。   A pseudo program that is appropriately executed by the processor 106 in the development mode used at the time of debugging in software development of the control device 101 is mounted on the ERAM 103 that can be easily rewritten. The product (prototype) at the time of development is in development mode. In the development mode, the processor 106 executes a pseudo program stored in the ERAM 103. The pseudo program is a software program that simulates a control program.

開発者は、デバッグ機能部108を、外部装置であるデバッガー109を経由してパーソナルコンピュータ110でモニタしたり、制御したりしながら、制御プログラムのデバッグを行う。デバッグでは開発者は疑似プログラムを書き換えながら繰り返し実行する。デバッグ機能部108を介してパーソナルコンピュータ110から実行可能なデバッグ機能として、トレース機能、キャリブレーション機能、およびエミュレーション機能がある。   The developer debugs the control program while monitoring and controlling the debug function unit 108 with the personal computer 110 via the debugger 109 which is an external device. In debugging, the developer repeatedly executes the pseudo program while rewriting it. Debug functions that can be executed from the personal computer 110 via the debug function unit 108 include a trace function, a calibration function, and an emulation function.

トレース機能は、プロセッサ106により実行されるソフトウェアの動作をステップ毎に確認するために、プロセッサ106の動作および状態を情報を蓄積する機能である。トレース機能において、デバッグ機能部108は、プロセッサバスであるシステムインターコネクト111上を流れる信号を観測し、プロセッサ106の動作を示すトレース情報を取得する。トレース情報は、例えば、プロセッサ106が実行した一連の命令をデバッグ機能部108が、デバッグに利用しやすいように、圧縮した情報である。デバッグ機能部108は、取得したトレース情報をデバッガー109に出力する。開発者は、デバッガー109経由でパーソナルコンピュータ110に入力されるトレース情報を元に、疑似プログラムを実行したプロセッサ106の動作を辿ることが可能となる。なお、このトレース機能は、開発時の製品(試作品)では有効とされているが、量産製品ではプログラムの各種情報を読み取られないように無効とされるのが一般的である。   The trace function is a function for accumulating information on the operation and state of the processor 106 in order to confirm the operation of the software executed by the processor 106 for each step. In the trace function, the debug function unit 108 observes a signal flowing on the system interconnect 111 that is a processor bus, and acquires trace information indicating the operation of the processor 106. The trace information is, for example, information obtained by compressing a series of instructions executed by the processor 106 so that the debug function unit 108 can easily use the instructions for debugging. The debug function unit 108 outputs the acquired trace information to the debugger 109. The developer can trace the operation of the processor 106 that has executed the pseudo program based on the trace information input to the personal computer 110 via the debugger 109. This trace function is valid for a product (prototype) at the time of development, but is generally invalidated so that various types of program information cannot be read for mass-produced products.

キャリブレーション機能は、制御対象への制御に用いる制御パラメータの設定値をチューニングする機能である。制御パラメータはROMデータとも呼ばれ、量産製品ではフラッシュメモリ104に格納されるが、デバッグではERAM103上に保持されている。制御パラメータは例えば自動車の各部に対する制御に利用されるパラメータである。チューニングとは、それら制御パラメータの値を変更しながら結果を観測して最適な値を調べ、最適な制御パラメータを決定することである。開発者は、パーソナルコンピュータ110からデバッガー109を介してデバッグ機能部108を操作し、ERAM103上のROMデータをチューニングする。   The calibration function is a function for tuning a set value of a control parameter used for control of a control target. The control parameter is also called ROM data, and is stored in the flash memory 104 in mass-produced products, but is held on the ERAM 103 in debugging. The control parameter is a parameter used for controlling each part of the automobile, for example. Tuning is to determine the optimum control parameter by observing the result while changing the value of the control parameter and examining the optimum value. The developer operates the debug function unit 108 from the personal computer 110 via the debugger 109 to tune the ROM data on the ERAM 103.

エミュレーション機能は、疑似ソフトウェアをERAM103にダウンロードし、疑似ソフトウェアをプロセッサ106に実行させる機能である。エミュレーション機能では、プロセッサ106が動作中にフラッシュメモリ104をエミュレーション用メモリであるERAM103でエミュレートすることができる。つまり、プロセッサ106に、フラッシュメモリ104上の制御パラメータを利用して制御プログラムを実行させる代わりに、ERAM103上の制御パラメータを利用して疑似プログラムを実行させることができる。やはり、このエミュレーション機能は開発時の製品(試作品)では有効とされるが、量産製品ではプログラムの各種情報を読み取られたり、制御プログラムを改造されたりしないように無効とされるのが一般的である。   The emulation function is a function for downloading pseudo software to the ERAM 103 and causing the processor 106 to execute the pseudo software. In the emulation function, the flash memory 104 can be emulated by the ERAM 103 which is an emulation memory while the processor 106 is operating. That is, instead of causing the processor 106 to execute the control program using the control parameter on the flash memory 104, the pseudo program can be executed using the control parameter on the ERAM 103. Again, this emulation function is valid for products at the time of development (prototype), but for mass-produced products, it is generally invalidated so that various program information is not read and the control program is not modified. It is.

これらトレース機能、キャリブレーション機能、およびエミュレーション機能を組み合わせてデバッグが行われる。パーソナルコンピュータ110には、デバッガー109を利用するためのアプリケーションソフトウェア(以下「デバッガーアプリケーション」という)がインストールされている。また、パーソナルコンピュータ110には、開発対象である制御用のソフトウェアプログラム(以下「制御プログラム」ともいう)に関する各種情報を保持している。開発者は、パーソナルコンピュータ110にてデバッガーアプリケーションを実行し、制御プログラムの各種情報を参照しながら、エミュレーション機能、キャリブレーション機能、およびトレース機能を利用したデバッグを行う。   Debugging is performed by combining these trace function, calibration function, and emulation function. Application software (hereinafter referred to as “debugger application”) for using the debugger 109 is installed in the personal computer 110. Further, the personal computer 110 holds various types of information related to a control software program (hereinafter also referred to as “control program”) to be developed. The developer executes a debugger application on the personal computer 110, and performs debugging using an emulation function, a calibration function, and a trace function while referring to various information of the control program.

図2は、本実施形態における制御装置のソフトウェア開発におけるデバッグ環境を示す図である。図2を参照すると、デバッグ環境として、開発対象の制御装置201にはデバッガー209が接続され、更のそのデバッガー209にパーソナルコンピュータ(PC)210が接続されている。   FIG. 2 is a diagram showing a debug environment in software development of the control device in the present embodiment. Referring to FIG. 2, as a debugging environment, a debugger 209 is connected to the control apparatus 201 to be developed, and a personal computer (PC) 210 is connected to the debugger 209.

制御装置201にはマイコン202が搭載されている。マイコン202は、図1に示した各部のそれぞれに対応するエミュレーションRAM(ERAM)203、フラッシュメモリ(Flash)204、グローバルRAM(Global RAM)205、プロセッサ(CPU)206、EEPROM207、デバッグ機能部208、システムインターコネクト211、フラッシュインタフェース212、周辺バス213、および周辺機能部214に加え、更に、バススイッチ221、バススイッチ222、デバッグ用バス223、および通信機能部224を有している。ERAM203、EEPROM207、およびデバッグ機能部208はデバッグ用に設けられた部分である。上述したデバッガー209はデバッグ機能部208に接続されている。   A microcomputer 202 is mounted on the control device 201. The microcomputer 202 includes an emulation RAM (ERAM) 203, a flash memory (Flash) 204, a global RAM (Global RAM) 205, a processor (CPU) 206, an EEPROM 207, a debug function unit 208, corresponding to each unit shown in FIG. In addition to the system interconnect 211, the flash interface 212, the peripheral bus 213, and the peripheral function unit 214, the system further includes a bus switch 221, a bus switch 222, a debug bus 223, and a communication function unit 224. The ERAM 203, the EEPROM 207, and the debug function unit 208 are provided for debugging. The debugger 209 described above is connected to the debug function unit 208.

デバッグ用バス223はデバッグ用に設けられたバスである。バススイッチ221、222は、開発モードと量産モードでバス接続を切り替えるスイッチであり、プロセッサ206により切り替えが可能である。したがって、量産製品に用いる制御プログラムにおいてバススイッチ221、222を量産モードに設定すればよい。また、試作製品に用いる疑似プログラムにおいてバススイッチ221、222を開発モードに設定すればよい。   The debug bus 223 is a bus provided for debugging. The bus switches 221 and 222 are switches for switching the bus connection between the development mode and the mass production mode, and can be switched by the processor 206. Therefore, the bus switches 221 and 222 may be set to the mass production mode in the control program used for the mass production product. Further, the bus switches 221 and 222 may be set to the development mode in the pseudo program used for the prototype product.

バススイッチ221は開発モードではオン(閉)となり、量産モードではオフ(開)となる。バススイッチ222は開発モードではオフ(開)となり、量産モードではオン(閉)となる。制御装置201の開発時の製品(試作品)ではマイコン202は開発モードで使用され、制御装置201の量産製品ではマイコン202は量産モードで使用される。図2に示されているバススイッチ221、222の状態は開発モードの状態、つまり図2の制御装置201は試作品である。   The bus switch 221 is turned on (closed) in the development mode, and turned off (opened) in the mass production mode. The bus switch 222 is turned off (opened) in the development mode, and turned on (closed) in the mass production mode. In the product (prototype) at the time of development of the control device 201, the microcomputer 202 is used in the development mode, and in the mass production product of the control device 201, the microcomputer 202 is used in the mass production mode. The bus switches 221 and 222 shown in FIG. 2 are in a development mode, that is, the control device 201 in FIG. 2 is a prototype.

通信機能部224は診断ツール225を接続するインタフェース部である。通信機能部224は、診断ツール225からの要求に応じて、周辺バス213およびシステムインターコネクト221を介してEEPROM207にアクセスすることができる。診断ツール225は、通信機能部224と通信を行いてEEPROM207からデータを読みだすことができる。後述するように本実施形態では量産モードで取得されるトレース情報がEEPROM207に退避される。EEPROM207に格納されたトレース情報は通信機能部224を介して診断ツール225により取り出すことができる。   The communication function unit 224 is an interface unit that connects the diagnostic tool 225. The communication function unit 224 can access the EEPROM 207 via the peripheral bus 213 and the system interconnect 221 in response to a request from the diagnostic tool 225. The diagnostic tool 225 can read data from the EEPROM 207 by communicating with the communication function unit 224. As will be described later, in this embodiment, trace information acquired in the mass production mode is saved in the EEPROM 207. Trace information stored in the EEPROM 207 can be extracted by the diagnostic tool 225 via the communication function unit 224.

プロセッサ206はシステムインターコネクト211に接続されている。システムインターコネクト211にはグローバルRAM205、EEPROM207、フラッシュインタフェース212、周辺バス213、およびデバッグ機能部208が接続されている。   The processor 206 is connected to the system interconnect 211. A global RAM 205, EEPROM 207, flash interface 212, peripheral bus 213, and debug function unit 208 are connected to the system interconnect 211.

プロセッサ206はシステムインターコネクト211を介してグローバルRAM205およびEEPROM207にアクセスすることができる。   The processor 206 can access the global RAM 205 and the EEPROM 207 via the system interconnect 211.

フラッシュインタフェース212には、フラッシュメモリ204が接続されており、さらにバススイッチ222を介してERAM203が接続されている。上述したようにバススイッチ222は量産モードでオフとなり、開発モードでオンとなる。バススイッチ221は量産モードでオンとなり、開発モードでオフとなる。そのため、プロセッサ206は、開発モードでは、システムインターコネクト211およびフラッシュインタフェース212を介してERAM203およびフラッシュメモリ204にアクセス可能である。また、プロセッサ206は、量産モードでは、システムインターコネクト211およびフラッシュインタフェース212を介してフラッシュメモリ204にアクセス可能であるが、ERAM203へはアクセスできない。   A flash memory 204 is connected to the flash interface 212, and an ERAM 203 is further connected via a bus switch 222. As described above, the bus switch 222 is turned off in the mass production mode and turned on in the development mode. The bus switch 221 is turned on in the mass production mode and turned off in the development mode. Therefore, the processor 206 can access the ERAM 203 and the flash memory 204 via the system interconnect 211 and the flash interface 212 in the development mode. Further, in the mass production mode, the processor 206 can access the flash memory 204 via the system interconnect 211 and the flash interface 212, but cannot access the ERAM 203.

量産モードにおいてプロセッサ206が実行する制御プログラムはフラッシュメモリ204に搭載される。量産モードでは、プロセッサ206は、フラッシュメモリ204に格納された制御プログラムを実行する。プロセッサ206は、グローバルRAM205を利用しながら制御プログラムを実行する。   A control program executed by the processor 206 in the mass production mode is installed in the flash memory 204. In the mass production mode, the processor 206 executes a control program stored in the flash memory 204. The processor 206 executes a control program while using the global RAM 205.

周辺バス213には複数の周辺機能部214および通信機能部224が接続されている。周辺機能部214は、制御装置201の制御に利用される各種機能部である。例えば、周辺機能部214は、制御対象あるいはその周辺に設置されたセンサからのセンサ入力を取得するセンサインタフェースである。センサ入力はセンサで観測された情報を示す入力信号である。あるいは、周辺機能部214は、制御対象への制御出力を送信する制御インタフェースである。制御出力は制御対象に対して指示する制御を示す出力信号である。プロセッサ206は、制御プログラムの処理に応じて適宜、周辺機能部214と信号を送受信する。   A plurality of peripheral function units 214 and communication function units 224 are connected to the peripheral bus 213. The peripheral function unit 214 is various function units used for control of the control device 201. For example, the peripheral function unit 214 is a sensor interface that acquires sensor inputs from a control target or a sensor installed in the vicinity thereof. The sensor input is an input signal indicating information observed by the sensor. Alternatively, the peripheral function unit 214 is a control interface that transmits a control output to the control target. The control output is an output signal indicating control instructed to the control target. The processor 206 transmits and receives signals to and from the peripheral function unit 214 as appropriate according to the processing of the control program.

開発モードにおいてプロセッサ206が適宜実行する疑似プログラムは、書き換えが容易なERAM203に搭載される。開発モードでは、プロセッサ206は、ERAM203に格納された疑似プログラムを実行する。疑似プログラムは制御プログラムを疑似するソフトウェアプログラムである。   The pseudo program that is appropriately executed by the processor 206 in the development mode is mounted on the ERAM 203 that can be easily rewritten. In the development mode, the processor 206 executes a pseudo program stored in the ERAM 203. The pseudo program is a software program that simulates a control program.

開発者は、デバッグ機能部208を、外部装置であるデバッガー209を経由してパーソナルコンピュータ210でモニタしたり、制御したりしながら、制御プログラムのデバッグを行う。デバッグでは開発者は疑似プログラムを書き換えながら繰り返し実行する。デバッグ機能部208を介してパーソナルコンピュータ210から実行可能なデバッグ機能として、トレース機能、キャリブレーション機能、およびエミュレーション機能がある。   The developer debugs the control program while monitoring or controlling the debug function unit 208 with the personal computer 210 via the debugger 209 which is an external device. In debugging, the developer repeatedly executes the pseudo program while rewriting it. Debug functions that can be executed from the personal computer 210 via the debug function unit 208 include a trace function, a calibration function, and an emulation function.

トレース機能は、プロセッサ206により実行されるソフトウェアの動作をステップ毎に確認するために、プロセッサ206の動作および状態を、情報を蓄積する機能である。トレース機能において、デバッグ機能部208は、プロセッサバスであるシステムインターコネクト211上を流れる信号を観測し、プロセッサ206の動作を示すトレース情報を取得する。トレース情報は、例えば、プロセッサ206が実行した一連の命令をデバッグ機能部208が、デバッグに利用しやすいように、圧縮した情報である。デバッグ機能部208は、取得したトレース情報をデバッガー209に出力する。開発者は、デバッガー209経由でパーソナルコンピュータ210に入力されるトレース情報を元に、疑似プログラムを実行したプロセッサ206の動作を辿ることが可能となる。なお、このトレース機能は、開発時の製品(試作品)では有効とされているが、量産製品ではプログラムの各種情報を読み取られないように無効とされる。   The trace function is a function for accumulating information on the operation and state of the processor 206 in order to confirm the operation of the software executed by the processor 206 for each step. In the trace function, the debug function unit 208 observes a signal flowing on the system interconnect 211 that is a processor bus, and acquires trace information indicating the operation of the processor 206. The trace information is, for example, information obtained by compressing a series of instructions executed by the processor 206 so that the debug function unit 208 can easily use the instructions for debugging. The debug function unit 208 outputs the acquired trace information to the debugger 209. The developer can trace the operation of the processor 206 that has executed the pseudo program based on the trace information input to the personal computer 210 via the debugger 209. This trace function is valid for a product (prototype) at the time of development, but is invalidated so that various types of program information cannot be read for mass-produced products.

キャリブレーション機能は、制御対象への制御に用いる制御パラメータの設定値をチューニングする機能である。制御パラメータはROMデータとも呼ばれ、量産製品ではフラッシュメモリ204に格納されるが、デバッグではERAM203上に保持されている。制御パラメータは例えば自動車の各部に対する制御に利用されるパラメータである。開発者は、パーソナルコンピュータ210からデバッガー209を介してデバッグ機能部208を操作し、ERAM203上のROMデータをチューニングする。   The calibration function is a function for tuning a set value of a control parameter used for control of a control target. The control parameter is also called ROM data, and is stored in the flash memory 204 in mass-produced products, but is held on the ERAM 203 in debugging. The control parameter is a parameter used for controlling each part of the automobile, for example. The developer operates the debug function unit 208 from the personal computer 210 via the debugger 209 to tune ROM data on the ERAM 203.

エミュレーション機能は、疑似ソフトウェアをERAM203にダウンロードし、疑似ソフトウェアをプロセッサ206に実行させる機能である。エミュレーション機能では、プロセッサ206が動作中にフラッシュメモリ204をエミュレーション用メモリであるERAM203でエミュレートすることができる。つまり、プロセッサ206に、フラッシュメモリ204上の制御パラメータを利用して制御プログラムを実行させる代わりに、ERAM203上の制御パラメータを利用して疑似プログラムを実行させることができる。エミュレーション機能は開発時の製品(試作品)では有効とされるが、量産製品ではプログラムの各種情報を読み取られたり、制御プログラムを改造されたりしないように無効とされる。   The emulation function is a function for downloading pseudo software to the ERAM 203 and causing the processor 206 to execute the pseudo software. In the emulation function, the flash memory 204 can be emulated by the ERAM 203 which is an emulation memory while the processor 206 is operating. That is, instead of causing the processor 206 to execute the control program using the control parameter on the flash memory 204, the pseudo program can be executed using the control parameter on the ERAM 203. The emulation function is valid for a product at the time of development (prototype), but is invalidated for mass-produced products so that various information of the program is not read and the control program is not modified.

これらトレース機能、キャリブレーション機能、およびエミュレーション機能を組み合わせてデバッグが行われる。パーソナルコンピュータ210には、デバッガー209を利用するためのアプリケーションソフトウェア(以下「デバッガーアプリケーション」という)がインストールされている。また、パーソナルコンピュータ210には、開発対象である制御用のソフトウェアプログラム(以下「制御プログラム」ともいう)に関する各種情報を保持している。開発者は、パーソナルコンピュータ210にてデバッガーアプリケーションを実行し、制御プログラムの各種情報を参照しながら、エミュレーション機能、キャリブレーション機能、およびトレース機能を利用したデバッグを行う。   Debugging is performed by combining these trace function, calibration function, and emulation function. Application software (hereinafter referred to as “debugger application”) for using the debugger 209 is installed in the personal computer 210. Further, the personal computer 210 holds various types of information related to a control software program (hereinafter also referred to as “control program”) to be developed. The developer executes a debugger application on the personal computer 210 and performs debugging using an emulation function, a calibration function, and a trace function while referring to various information of the control program.

図3は、本実施形態における量産製品の制御装置を示すブロック図である。量産製品の制御装置201は図2に示した開発環境の制御装置201と同じマイコン202を搭載している。図3に示した量産製品の制御装置201はバススイッチ221、222の設定が図2に示した試作製品と異なる。また、量産製品の制御装置201は、図2の試作製品とは異なりデバッガー209と接続するインタフェースを持たない。   FIG. 3 is a block diagram illustrating a mass production product control apparatus according to the present embodiment. The mass-produced product control device 201 includes the same microcomputer 202 as the development environment control device 201 shown in FIG. The mass production product control device 201 shown in FIG. 3 differs from the prototype product shown in FIG. 2 in the settings of the bus switches 221 and 222. Further, unlike the prototype product of FIG. 2, the mass-produced control device 201 does not have an interface for connecting to the debugger 209.

上述したように、量産モードあるいは量産製品では、バススイッチ222はオフとなり、バススイッチ221はオンとなる。そのため、プロセッサ206は、量産モードでは、システムインターコネクト211およびフラッシュインタフェース212を介してフラッシュメモリ204にアクセス可能であるが、ERAM203へはアクセスできない。その代り、ERAM203はデバッグ機能部208からアクセス可能である。   As described above, in the mass production mode or mass production product, the bus switch 222 is turned off and the bus switch 221 is turned on. Therefore, the processor 206 can access the flash memory 204 via the system interconnect 211 and the flash interface 212 in the mass production mode, but cannot access the ERAM 203. Instead, the ERAM 203 is accessible from the debug function unit 208.

量産製品の制御装置201では、デバッグ機能部208は、システムインターコネクト211上を流れる信号を観測して取得したトレース情報をERAM203に記録する。デバッグ機能部208はプロセッサ206が正常に動作を続ける間はトレース情報を取得し、ERAM203上に構成したリングバッファに記録し続ける。   In the mass-produced product control apparatus 201, the debug function unit 208 records the trace information acquired by observing signals flowing on the system interconnect 211 in the ERAM 203. While the processor 206 continues to operate normally, the debug function unit 208 acquires trace information and continues to record it in the ring buffer configured on the ERAM 203.

また、所定の異常が発生したとき、デバッグ機能部208はトレース情報の取得を停止し、そのときにERAM203に存在しているトレース情報をEEPROM207に退避させる。つまり、デバッグ機能部208は、ERAM203に記録されているトレース情報を読みだしてEEPROM207に書き込む。このEEPROM207に退避されたトレース情報は、診断ツール225により通信機能部224および周辺バス213を介して取り出すことができる。   Further, when a predetermined abnormality occurs, the debug function unit 208 stops the acquisition of the trace information, and saves the trace information existing in the ERAM 203 in the EEPROM 207 at that time. That is, the debug function unit 208 reads the trace information recorded in the ERAM 203 and writes it in the EEPROM 207. The trace information saved in the EEPROM 207 can be taken out by the diagnostic tool 225 via the communication function unit 224 and the peripheral bus 213.

以上のように、本実施形態では、開発モードにて疑似プログラムおよび制御パラメータが格納されるERAM203を用いて、量産モードでトレース情報を蓄積するので、トレース情報を記録するための記録装置の部品を別途追加しなくてよい。   As described above, in this embodiment, the trace information is accumulated in the mass production mode by using the ERAM 203 in which the pseudo program and the control parameters are stored in the development mode. Therefore, the components of the recording apparatus for recording the trace information are provided. There is no need to add it separately.

また、量産製品の制御装置201と試作品の制御装置201はハードウェアとしてはデバッガー209へのインタフェースの有無が違うだけである。この違いはインタフェースの有無はコネクタを取り付けるか否かにより実現できるので試作品と量産製品を共通設計とすることができる。   Further, the mass production product control device 201 and the prototype control device 201 differ only in the presence or absence of an interface to the debugger 209 as hardware. This difference can be realized by whether or not an interface is attached, so that the prototype and the mass-produced product can be designed in common.

以上説明したように、本実施形態のマイコン202は、量産モード(第1モード)では制御対象への制御を実現する所定の制御プログラムを実行し、開発モード(第2モード)では制御プログラムの動作を疑似する疑似プログラムを実行する情報処理装置である。そして、マイコン202は、リードオンリメモリ(フラッシュメモリ204)、ランダムアクセスメモリ(ERAM 205)、プロセッサ206、およびデバッグ機能部208を有している。フラッシュメモリ204は制御プログラムを格納する。ERAM 205は、開発モードにおいて疑似プログラムを保持する。プロセッサ206は、量産モードではフラッシュメモリ204の制御プログラムを実行し、開発モードではERAM 205の疑似プログラムを実行する。デバッグ機能部208は、量産モードにおいてプロセッサ206の動作を表すトレース情報を取得してERAM203に記録し、開発モードにおいてトレース情報を取得して外部のデバッグ用装置(デバッガー209)に出力する。開発モード(第2モード)においてプロセッサが実行する疑似プログラムを保持させておくランダムアクセスメモリを、量産モード(第1モード)においてトレース情報を記録するのに利用するので、トレース情報を記録するための部品追加を抑えることができる。   As described above, the microcomputer 202 according to the present embodiment executes a predetermined control program that realizes control of a control target in the mass production mode (first mode), and operates the control program in the development mode (second mode). This is an information processing apparatus that executes a pseudo program that simulates. The microcomputer 202 includes a read only memory (flash memory 204), a random access memory (ERAM 205), a processor 206, and a debug function unit 208. The flash memory 204 stores a control program. The ERAM 205 holds a pseudo program in the development mode. The processor 206 executes a control program of the flash memory 204 in the mass production mode, and executes a pseudo program of the ERAM 205 in the development mode. The debug function unit 208 acquires trace information representing the operation of the processor 206 in the mass production mode, records it in the ERAM 203, acquires the trace information in the development mode, and outputs it to an external debugging device (debugger 209). A random access memory that holds a pseudo program executed by the processor in the development mode (second mode) is used to record trace information in the mass production mode (first mode). Addition of parts can be suppressed.

また、ERAM203を、量産モードではデバッグ機能部208からアクセス可能にし、開発モードではプロセッサ206からアクセス可能にするバススイッチ221、222を更に有する。そのため、ERAM203をプロセッサ206とデバッグ機能部208のどちらに接続するかを切り替えるバススイッチ221、222を設けているので、疑似プログラムを用いる開発用と常時プロセッサ206の動作をトレースする量産用の両方に同一のマイコン202をスイッチ切り替えで兼用することができる。   The ERAM 203 further includes bus switches 221 and 222 that are accessible from the debug function unit 208 in the mass production mode and accessible from the processor 206 in the development mode. For this reason, bus switches 221 and 222 for switching whether the ERAM 203 is connected to the processor 206 or the debug function unit 208 are provided, so that both the development using the pseudo program and the mass production for tracing the operation of the processor 206 at all times are provided. The same microcomputer 202 can be shared by switching.

また、バススイッチ221、222は、プロセッサ206から設定可能なレジスタに設定された値によって、ERAM203をデバッグ機能部208からアクセス可能するか、プロセッサ206からアクセス可能にするかを切り替える。バススイッチ221、222をソフトウェアにより切り替えることができるので、開発モード(第2モード)を使用する試作品と、量産モード(第1モード)を使用する量産品に共通のハードウェアを採用することができ、開発コストの削減、開発期間の短縮に寄与することができる。   The bus switches 221 and 222 switch whether the ERAM 203 can be accessed from the debug function unit 208 or the processor 206 depending on a value set in a register that can be set by the processor 206. Since the bus switches 221 and 222 can be switched by software, it is possible to adopt common hardware for a prototype that uses the development mode (second mode) and a mass-produced product that uses the mass production mode (first mode). It can contribute to reduction of development cost and development period.

また、制御プログラムは、ERAM203がデバッグ機能部208からアクセス可能となるようにレジスタを設定し、疑似プログラムは、ERAM203がプロセッサ206からアクセス可能となるようにレジスタを設定する。制御ソフトウェアと疑似プログラムとでレジスタに設定する値を変えることで、開発モード(第2モード)を使用する試作品と、量産モード(第1モード)を使用する量産品を実現することができる。   The control program sets registers so that the ERAM 203 can be accessed from the debug function unit 208, and the pseudo program sets registers so that the ERAM 203 can be accessed from the processor 206. By changing the value set in the register between the control software and the pseudo program, it is possible to realize a prototype that uses the development mode (second mode) and a mass-produced product that uses the mass production mode (first mode).

また、デバッグ機能部208は、第1モードにおいては、ERAM203にリングバッファを構成し、そのリングバッファにトレース情報を記録する。リングバッファを構成してトレース情報を記録するので、トレース情報の記録を継続的に実行することができ、継続的に生成されるトレース情報のうち新しい部分がランダムアクセスメモリに存在する状態を維持することができる。20   Further, in the first mode, the debug function unit 208 configures a ring buffer in the ERAM 203 and records trace information in the ring buffer. Since the ring buffer is configured to record the trace information, the trace information can be continuously recorded, and the state in which a new part of the continuously generated trace information exists in the random access memory is maintained. be able to. 20

また、マイコン202は、デバッグ機能部208からアクセス可能な退避用メモリ(EEPROM)207を更に有し、デバッグ機能部208は、所定の条件が満たされたとき、ERAM203に記録されているトレース情報をEEPROM207に退避する。所定の条件が発生したらその直前のトレース情報が上書きされないようにリングバッファからEEPROM 207に退避させるので、所望されるトレース情報を残しておくことができる。   The microcomputer 202 further includes a save memory (EEPROM) 207 that can be accessed from the debug function unit 208. The debug function unit 208 displays the trace information recorded in the ERAM 203 when a predetermined condition is satisfied. Retreat to EEPROM 207. When a predetermined condition occurs, it is saved from the ring buffer to the EEPROM 207 so that the previous trace information is not overwritten, so that desired trace information can be left.

また、所定の条件は所定の障害の発生である。これにより、障害発生時およびその直前のトレース情報を消去されないように保存することができる。   The predetermined condition is the occurrence of a predetermined failure. As a result, the trace information at the time of occurrence of the failure and immediately before the failure can be saved so as not to be erased.

また、デバッグ機能部208は、レース情報を記録するEEPROM 207のアドレスである退避先アドレスを管理しており、トレース情報をEEPROM 207に記録すると、トレース情報を上書きしないように退避用アドレスを更新する。トレース情報を退避する毎に、そのトレース情報が上書きされないように、次にトレース情報を書き込む領域を更新していくので、複数の事象のトレース情報を取得することができる。   The debug function unit 208 manages a save destination address that is an address of the EEPROM 207 that records race information. When the trace information is recorded in the EEPROM 207, the save address is updated so that the trace information is not overwritten. . Each time the trace information is saved, the area in which the trace information is written is updated so that the trace information is not overwritten, so that the trace information of a plurality of events can be acquired.

また、EEPROM 207はプロセッサ206の処理を介さず外部にデータを取り出し可能である。このように、プロセッサ206の処理を介さずにデータを取り出すことができるので、異常な状態でもデータを容易に取り出して異常の原因分析に供することができる。   Further, the EEPROM 207 can extract data to the outside without going through the processing of the processor 206. As described above, since data can be extracted without going through the processing of the processor 206, data can be easily extracted even in an abnormal state and used for cause analysis of the abnormality.

また、本実施形態による制御装置201の制御対象は自動車である。小型、軽量、低コスト化が望まれる自動車搭載に適した処理装置を実現することができる。   Further, the control target of the control device 201 according to the present embodiment is an automobile. It is possible to realize a processing apparatus suitable for mounting in an automobile, which is desired to be small, light, and low in cost.

以下、本実施形態による制御装置201の処理について説明する。   Hereinafter, processing of the control device 201 according to the present embodiment will be described.

図4は、本実施形態におけるデバッグ時の動作を示すフローチャートである。   FIG. 4 is a flowchart showing an operation at the time of debugging in the present embodiment.

まず、デバッグ機能部208は、マイコン202が搭載されている制御装置201の電源が投入されると(ステップ301)、制御プログラムあるいは疑似プログラムがバススイッチ221、222を設定する(ステップ302)。   First, when the power of the control device 201 on which the microcomputer 202 is mounted is turned on (step 301), the debug function unit 208 sets the bus switches 221 and 222 by the control program or the pseudo program (step 302).

デバッグ機能部208は、マイコン202の設定が量産モードであるか否か判定する(ステップ303)。量産モードでなく開発モードであれば、デバッグ機能部208は、トレース情報を取得してデバッガー209に出力する開発モードの動作を行う(ステップ304)。   The debug function unit 208 determines whether or not the setting of the microcomputer 202 is the mass production mode (step 303). If the development mode is not the mass production mode, the debug function unit 208 performs the development mode operation of acquiring trace information and outputting it to the debugger 209 (step 304).

一方、マイコン202の設定が量産モードであれば、デバッグ機能部208は、トレース情報を取得し、ERAM203に記録する(ステップ305)。デバッグ機能部208は、異常が検出されたか否か判定する(ステップ306)。異常が検出されない間は、デバッグ機能部208はトレース情報を取得し、ERAM203に記録するという動作を繰り返す。このときデバッグ機能部208はERAM203に所定サイズのリングバッファを構成し、そこにトレージ情報を書き込む。   On the other hand, if the setting of the microcomputer 202 is the mass production mode, the debug function unit 208 acquires trace information and records it in the ERAM 203 (step 305). The debug function unit 208 determines whether an abnormality has been detected (step 306). While no abnormality is detected, the debug function unit 208 repeats the operation of acquiring trace information and recording it in the ERAM 203. At this time, the debug function unit 208 configures a ring buffer of a predetermined size in the ERAM 203 and writes the storage information therein.

一方、異常が検出されたときには、デバッグ機能部208は、その時点でERAM203に存在しているトレース情報をEEPROM207に転送し、記録させる。そして、異常が繰り返し検出したときに退避したトレース情報が上書きされしまうことがないように、記録先のアドレスを変更し、ステップ305に記載されている通常動作に戻る(ステップ308)。   On the other hand, when an abnormality is detected, the debug function unit 208 transfers the trace information currently existing in the ERAM 203 to the EEPROM 207 for recording. Then, the recording destination address is changed so that the trace information saved when the abnormality is repeatedly detected is not overwritten, and the normal operation described in step 305 is resumed (step 308).

なお、EEPROM207に記録されたトレース情報は、マイコン202の通信機能部224を介し、外部機器である診断ツール215を使用して外部に取り出すことができる。   Note that the trace information recorded in the EEPROM 207 can be extracted outside using the diagnostic tool 215 which is an external device via the communication function unit 224 of the microcomputer 202.

101…制御装置、102…マイコン、103…ERAM、104…フラッシュメモリ、105…グローバルRAM、106…プロセッサ、107…EEPROM、108…デバッグ機能部、109…デバッガー、110…パーソナルコンピュータ、111…システムインターコネクト、112…フラッシュインタフェース、113…周辺バス、114…周辺機能部、201…制御装置、202…マイコン、203…ERAM、204…フラッシュメモリ、205…グローバルRAM、206…プロセッサ、207…EEPROM、208…デバッグ機能部、209…デバッガー、210…パーソナルコンピュータ、211…システムインターコネクト、212…フラッシュインタフェース、213…周辺バス、214…周辺機能部、215…診断ツール、221…バススイッチ、222…バススイッチ、223…デバッグ用バス、224…通信機能部、225…診断ツール DESCRIPTION OF SYMBOLS 101 ... Control apparatus, 102 ... Microcomputer, 103 ... ERAM, 104 ... Flash memory, 105 ... Global RAM, 106 ... Processor, 107 ... EEPROM, 108 ... Debug function part, 109 ... Debugger, 110 ... Personal computer, 111 ... System interconnect , 112 ... Flash interface, 113 ... Peripheral bus, 114 ... Peripheral function unit, 201 ... Control device, 202 ... Microcomputer, 203 ... ERAM, 204 ... Flash memory, 205 ... Global RAM, 206 ... Processor, 207 ... EEPROM, 208 ... Debug function unit 209 Debugger 210 210 Personal computer 211 System interconnect 212 Flash interface 213 Peripheral bus 214 Peripheral function unit 215 Diagnostic tools, 221 ... bus switch, 222 ... bus switch, 223 ... debugging bus, 224 ... communication function unit, 225 ... diagnostic tool

Claims (10)

第1モードでは制御対象への制御を実現する所定の制御プログラムを実行し、第2モードでは前記制御プログラムの動作を疑似する疑似プログラムを実行する情報処理装置であって、
前記制御プログラムを格納するリードオンリメモリと、
前記第2モードにおいて前記疑似プログラムを保持するランダムアクセスメモリと、
第1モードでは前記リードオンリメモリの前記制御プログラムを実行し、前記第2モードでは前記ランダムアクセスメモリの前記疑似プログラムを実行するプロセッサと、
前記第1モードにおいて前記プロセッサの動作を表すトレース情報を取得して前記ランダムアクセスメモリに記録し、前記第2モードにおいて前記トレース情報を取得して外部のデバッグ用装置に出力するデバッグ機能部と、
を有する情報処理装置。
An information processing apparatus that executes a predetermined control program that realizes control of a control target in the first mode, and that executes a pseudo program that simulates the operation of the control program in the second mode,
A read only memory for storing the control program;
A random access memory for holding the pseudo program in the second mode;
A processor that executes the control program of the read-only memory in a first mode, and executes the pseudo program of the random access memory in the second mode;
A debug function unit for acquiring trace information representing the operation of the processor in the first mode and recording the trace information in the random access memory; acquiring the trace information in the second mode; and outputting the trace information to an external debugging device;
An information processing apparatus.
前記ランダムアクセスメモリを、前記第1モードでは前記デバッグ機能部からアクセス可能にし、前記第2モードでは前記プロセッサからアクセス可能にするスイッチを更に有する、請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, further comprising a switch that makes the random access memory accessible from the debug function unit in the first mode and accessible from the processor in the second mode. 前記スイッチは、前記プロセッサから設定可能なレジスタに設定された値によって、前記ランダムアクセスメモリを前記デバッグ機能部からアクセス可能するか、前記プロセッサからアクセス可能にするかを切り替える、請求項2に記載の情報処理装置。   3. The switch according to claim 2, wherein the switch switches whether the random access memory is accessible from the debug function unit or is accessible from the processor according to a value set in a register settable from the processor. Information processing device. 前記制御プログラムは、前記ランダムアクセスメモリが前記デバッグ機能部からアクセス可能となるように前記レジスタを設定し、
前記疑似プログラムは、前記ランダムアクセスメモリが前記プロセッサからアクセス可能となるように前記レジスタを設定する、
請求項3に記載の情報処理装置。
The control program sets the register so that the random access memory can be accessed from the debug function unit,
The pseudo program sets the register so that the random access memory is accessible from the processor.
The information processing apparatus according to claim 3.
前記デバッグ機能部は、前記第1モードにおいては、前記ランダムアクセスメモリにリングバッファを構成し、該リングバッファに前記トレース情報を記録する、請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the debug function unit configures a ring buffer in the random access memory and records the trace information in the ring buffer in the first mode. 前記情報処理装置は、前記デバッグ機能部からアクセス可能な退避用メモリを更に有し、
前記デバッグ機能部は、所定の条件が満たされたとき、前記ランダムアクセスメモリに記録されている前記トレース情報を前記退避用メモリに退避する、
請求項5に記載の情報処理装置。
The information processing apparatus further includes a save memory accessible from the debug function unit,
The debug function unit saves the trace information recorded in the random access memory to the save memory when a predetermined condition is satisfied,
The information processing apparatus according to claim 5.
前記所定の条件は所定の障害の発生である、請求項6に記載の情報処理装置。   The information processing apparatus according to claim 6, wherein the predetermined condition is occurrence of a predetermined failure. 前記デバッグ機能部は、前記トレース情報を記録する前記退避用メモリのアドレスである退避先アドレスを管理しており、前記トレース情報を前記退避用メモリに記録すると、前記トレース情報を上書きしないように前記退避先アドレスを更新する、請求項6に記載の情報処理装置。   The debug function unit manages a save destination address that is an address of the save memory for recording the trace information. When the trace information is recorded in the save memory, the debug information is not overwritten. The information processing apparatus according to claim 6, wherein the save destination address is updated. 前記退避用メモリは前記プロセッサの処理を介さず外部にデータを取り出し可能である、請求項6に記載の情報処理装置。   The information processing apparatus according to claim 6, wherein the evacuation memory is capable of taking out data outside the processing of the processor. 前記制御対象は自動車である、請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the control target is an automobile.
JP2017025566A 2017-02-15 2017-02-15 Information processing apparatus Pending JP2018132914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017025566A JP2018132914A (en) 2017-02-15 2017-02-15 Information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017025566A JP2018132914A (en) 2017-02-15 2017-02-15 Information processing apparatus

Publications (1)

Publication Number Publication Date
JP2018132914A true JP2018132914A (en) 2018-08-23

Family

ID=63247482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017025566A Pending JP2018132914A (en) 2017-02-15 2017-02-15 Information processing apparatus

Country Status (1)

Country Link
JP (1) JP2018132914A (en)

Similar Documents

Publication Publication Date Title
US6877114B2 (en) On-chip instrumentation
JP5904989B2 (en) Method and adjusting unit for adjusting a control device
US9170901B2 (en) System and method for analyzing an electronics device including a logic analyzer
US7562258B2 (en) Generation of trace elements within a data processing apparatus
EP1754156A2 (en) Data processing system with trace co-processor
US7577876B2 (en) Debug system for data tracking
US7788543B2 (en) Methods and systems for generating and storing computer program execution trace data
US20120036501A1 (en) Method and System for Capturing System and User Events Using Hardware Trace Devices
US20060150021A1 (en) Device and method for analyzing embedded systems
US10162324B2 (en) Method for manipulating a control program of a control device
US20030233601A1 (en) Non-intrusive signal observation techniques usable for real-time internal signal capture for an electronic module or integrated circuit
US20060179380A1 (en) On-chip electronic hardware debug support units having execution halting capabilities
US8010774B2 (en) Breakpointing on register access events or I/O port access events
CN113127291A (en) Micro-controller
JP2018132914A (en) Information processing apparatus
US20200183809A1 (en) Usage amount monitoring method and monitoring unit of electronic control unit for vehicle
US20050210327A1 (en) Diagnostic mechanisms within multi processing systems
KR20180008629A (en) Method and apparatus for providing test response
US8171341B2 (en) Method for controlling an operating mechanism and a manipulation unit
US20060117225A1 (en) Electronic device with debugging function and method thereof
US9513984B2 (en) Hardware signal logging in embedded block random access memory
US20170235656A1 (en) Systems and methods for invasive debug of a processor without processor execution of instructions
Fidalgo et al. A modified debugging infrastructure to assist real time fault injection campaigns
JP2007156594A (en) Program trace unit and method
JP2019087118A (en) On-vehicle control device