JP2013109652A - Compiler, control method of program module generated by compiler, and control device which achieves control method - Google Patents

Compiler, control method of program module generated by compiler, and control device which achieves control method Download PDF

Info

Publication number
JP2013109652A
JP2013109652A JP2011255276A JP2011255276A JP2013109652A JP 2013109652 A JP2013109652 A JP 2013109652A JP 2011255276 A JP2011255276 A JP 2011255276A JP 2011255276 A JP2011255276 A JP 2011255276A JP 2013109652 A JP2013109652 A JP 2013109652A
Authority
JP
Japan
Prior art keywords
execution
processing unit
cpu
machine language
program module
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
JP2011255276A
Other languages
Japanese (ja)
Inventor
Isao Tatsuno
功 辰野
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.)
LE TEKKU KK
LETech Co Ltd
Original Assignee
LE TEKKU KK
LETech Co 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 LE TEKKU KK, LETech Co Ltd filed Critical LE TEKKU KK
Priority to JP2011255276A priority Critical patent/JP2013109652A/en
Publication of JP2013109652A publication Critical patent/JP2013109652A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Retry When Errors Occur (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To restore a system to an original sate within very short time while avoiding initialization of a whole system as much as possible, even when a CPU of a microcomputer becomes unable to execute a program due to external noise, unstableness of power supply voltage or other reasons and a fatal error such as runaway occurs.SOLUTION: When a first and a second program modules generated by dividing machine language which is generated by compiling one or more source codes are executed, a CPU is reset between execution of the first program module and the second program module. When an error is detected in the CPU, a register of the CPU is restored using information stored in RAM and the CPU is restored to a state before occurrence of the error. By this way, an application program being executed is restored within very short time, and software processing is able to be continued as if the fatal error has not occurred.

Description

本発明は、コンパイラ、そのコンパイラによって作成されたプログラムモジュールの制御方法、及び、その制御方法を実現する制御装置の動作方法に関する。より詳細には、制御装置(マイクロコンピュータ)の処理部(中央処理装置(CPU))において、いわゆる暴走などのエラーが発生した場合に、処理部を自動的に復帰させる制御装置の動作方法とその制御装置上で用いられるプログラムモジュールを作成するためのコンパイラに関する。   The present invention relates to a compiler, a method of controlling a program module created by the compiler, and an operation method of a control device that realizes the control method. More specifically, in the processing unit (central processing unit (CPU)) of the control device (microcomputer), when an error such as so-called runaway occurs, the operation method of the control device for automatically returning the processing unit and its operation The present invention relates to a compiler for creating a program module used on a control device.

マイクロコンピュータのCPUにおいて、外部の電気的なノイズ、静電気、電源電圧の不安定、及び、その他の原因で致命的なエラーが発生する。これにより、そのCPUがプログラムを実行することができなくなることがある。そのような致命的なエラーの状態の例としては、いわゆるCPUの暴走などが挙げられる。マイクロコンピュータのCPUの致命的なエラーへの対策としては、ウオッチドッグとして知られる方法が一般的である。この方法は、ソフトウェアの処理の繰り返し(ループ)時間より十分に長いタイマを設け、ソフトウェア処理のループにおいて、このタイマをリセットする。CPUに致命的なエラーが発生した場合、ソフトウェア処理が正常に動作しないため、タイマはリセットされずに終了し、タイマの終了をトリガとして、マイクロコンピュータ全体にリセットが与えられる。一方、CPUが正常に動作している場合(致命的なエラーが発生していない場合)、タイマは終了する前にリセットされるので、マイクロコンピュータはリセットされない。   In a CPU of a microcomputer, a fatal error occurs due to external electrical noise, static electricity, unstable power supply voltage, and other causes. As a result, the CPU may not be able to execute the program. An example of such a fatal error state is a so-called CPU runaway. As a countermeasure against a fatal error of the microcomputer CPU, a method known as a watch dog is generally used. In this method, a timer sufficiently longer than the repetition (loop) time of software processing is provided, and this timer is reset in the software processing loop. When a fatal error occurs in the CPU, the software processing does not operate normally, so the timer ends without being reset, and the entire microcomputer is reset with the end of the timer as a trigger. On the other hand, when the CPU is operating normally (when a fatal error has not occurred), the microcomputer is not reset because the timer is reset before it expires.

しかし、この方法では、CPUの致命的なエラー状態が、その発生からタイマの終了までの長い間継続する可能性がある。したがって、CPUの致命的なエラー発生からタイマが終了するまでの時間がマイクロコンピュータの使用に悪影響を及ぼすような環境や、その時間中のマイクロコンピュータの誤動作によって使用者に危険が及ぶような環境ではウオッチドッグは必ずしも有効でない。しかしながら、従来、他に有効な手段がないため、ウオッチドッグが採用され続けている。   However, in this method, a fatal error state of the CPU may continue for a long time from the occurrence to the end of the timer. Therefore, in an environment where the time from the occurrence of a fatal CPU error until the timer expires adversely affects the use of the microcomputer, or in an environment where the user may be at risk due to the malfunction of the microcomputer during that time. Watchdogs are not always effective. However, since there is no other effective means in the past, the watch dog has been adopted.

さらに、ウオッチドッグを用いたCPUの致命的なエラーの対策では、CPUにおいて致命的なエラーが発生した後、そのCPUの状態を、そのようなエラーが発生する直前の状態に戻すことは困難である。その理由は、CPUの致命的なエラーが検出される迄に時間がかかっているため、CPUの致命的なエラーが検出された時点のCPUレジスタの情報などの状態が、致命的なエラーが発生した直前の状態とは異なるからである。   Furthermore, it is difficult for the CPU to deal with a fatal error using a watchdog to return the CPU state to the state immediately before the occurrence of such an error after the fatal error occurred in the CPU. is there. The reason is that it takes time until a CPU fatal error is detected, so the status of the CPU register information at the time the CPU fatal error is detected causes a fatal error. This is because it is different from the previous state.

従来、マイクロコンピュータは、CPUの致命的なエラーを検出すると、CPUの致命的なエラーを検出した時点のCPUレジスタの情報などを破棄して、マイクロコンピュータ全体を初期化していた。したがって、従来、CPUを致命的なエラーから復帰させるためには、そのCPUの致命的なエラーを検出するための時間に加えて、マイクロコンピュータ全体を初期化するための時間が必要となっていた。そして、マイクロコンピュータを、CPUで致命的なエラーが発生する前の状態に戻すために、そのエラーが発生する前の実行中の処理(応用プログラム(アプリケーションプログラム)の処理)を、CPUの初期化後に再現しなければならない。実行中であった処理を再現することは容易ではなく、さらに、その再現を実行するための処理時間が必要となる。したがって、マイクロコンピュータを使用している環境によって、CPUの致命的なエラーからマイクロコンピュータを復帰させることは大きな問題になる可能性がある。例えば、CPUの致命的なエラーから初期化迄の時間に機械が停止できずに事故が起こり得るし、また、金銭の勘定が失われる等の深刻な事態も起こり得る。   Conventionally, when a microcomputer detects a fatal error in the CPU, the microcomputer register information and the like at the time when the fatal error in the CPU is detected is initialized. Therefore, conventionally, in order to recover the CPU from the fatal error, it is necessary to initialize the entire microcomputer in addition to the time for detecting the fatal error of the CPU. . Then, in order to return the microcomputer to the state before the fatal error occurred in the CPU, the process being executed before the error occurs (processing of the application program (application program)) is initialized to the CPU. It must be reproduced later. It is not easy to reproduce the process that was being executed, and a processing time is required to execute the reproduction. Therefore, depending on the environment in which the microcomputer is used, it may be a big problem to restore the microcomputer from a fatal CPU error. For example, the machine cannot be stopped during the time from the fatal error of the CPU to the initialization, an accident may occur, and a serious situation such as loss of a money account may occur.

一般的に、マイクロコンピュータを用いたワンチップマイコンには、初期化のための信号は1つしか用いられていない。このため、初期化はマイクロコンピュータ全体に対して行われる。よって、マイクロコンピュータの初期化は、全体を初期化するのに見合う重大なエラーの場合に行うことが想定されている。したがって、CPUの致命的なエラーからの復帰に時間がかかることや、その致命的なエラーが発生するまでの情報などが失われることは、従来、止むを得ないと考えられていた。   In general, a single-chip microcomputer using a microcomputer uses only one signal for initialization. For this reason, initialization is performed on the entire microcomputer. Therefore, it is assumed that the microcomputer is initialized in the case of a serious error commensurate with initializing the whole. Therefore, it has conventionally been considered inevitable that it takes time to recover from a fatal error of the CPU and that information until the fatal error occurs is lost.

さらに、別の方法において、特許文献1に記載されている様に、周期的な割込みの代わりに、リセットを周期的にCPUのみに与える方法もある。この方法を用いた場合、CPU上で実行される応用プログラムの実行開始から終了までの時間は、リセットの周期内でなければならない。なぜならば、応用プログラムの実行中にCPUがリセットされた場合、プログラムカウンタやスタックなどのCPUレジスタの情報もリセットされ、応用プログラム中の命令についてのアドレスが消去されるからである。したがって、CPUのみを周期的にリセットする場合、応用プログラムは、処理開始から終了までの時間がCPUのリセットの周期の間隔内に収まるような極めて小さなサイズとする必要が有る。また、応用プログラムの作成者は、応用プログラムの処理内容だけではなく、リセットの周期を意識して応用プログラムの作成を行わなくてはならないという問題がある。さらに、実行時に応用プログラムの処理時間が確定するような応用プログラム(例えば、画像などの大容量データを取り扱う応用プログラム)は作成することができないという問題がある。   Furthermore, as another method, as described in Patent Document 1, there is a method in which a reset is periodically given only to the CPU instead of a periodic interrupt. When this method is used, the time from the start to the end of the application program executed on the CPU must be within the reset cycle. This is because if the CPU is reset during the execution of the application program, the information in the CPU registers such as the program counter and stack is also reset, and the address for the instruction in the application program is erased. Therefore, when only the CPU is periodically reset, the application program needs to have a very small size so that the time from the start to the end of processing falls within the interval of the CPU reset period. In addition, there is a problem that the creator of the application program must create the application program in consideration of not only the processing contents of the application program but also the reset cycle. Furthermore, there is a problem that an application program (for example, an application program that handles large-capacity data such as an image) that determines the processing time of the application program at the time of execution cannot be created.

特開平6−71024号公報Japanese Patent Laid-Open No. 6-71024

本発明は、周期的にCPUがリセットされても動作するプログラムモジュールを作成するためのコンパイラ、そのプログラムモジュールを動作させるためのオペレーティングシステム(OS)、並びに、それらOS及びプログラムモジュールを動作させるためのマイクロコンピュータを提供する。これにより、マイクロコンピュータのCPUにおける致命的なエラーの発生を削減することできる。また、本発明は、マイクロコンピュータのCPUで致命的なエラーが発生した場合、マイクロコンピュータ全体の初期化又はリセットを行うことなく、CPUのみをリセットすることによって、マイクロコンピュータのCPUを致命的なエラー状態から極めて短時間に復帰させることを目的とする。さらに、本発明は、マイクロコンピュータ上で実行中の応用プログラムに影響を与えることなく、CPUをリセットすることを目的とする。そして、本発明によって、プログラムモジュールの実行時間が、CPUがリセットされる周期に基づいて調整されることから、応用プログラムの作成者は、リセットの周期を意識することなく応用プログラムの作成を行うことができる。   The present invention relates to a compiler for creating a program module that operates even when the CPU is periodically reset, an operating system (OS) for operating the program module, and for operating the OS and the program module. Provide a microcomputer. This can reduce the occurrence of fatal errors in the microcomputer CPU. Further, the present invention provides a microcomputer CPU with a fatal error by resetting only the CPU without initializing or resetting the entire microcomputer when a fatal error occurs in the microcomputer CPU. The purpose is to recover from the state in a very short time. Furthermore, an object of the present invention is to reset the CPU without affecting the application program being executed on the microcomputer. In addition, according to the present invention, the execution time of the program module is adjusted based on the cycle at which the CPU is reset, so that the creator of the application program creates the application program without being aware of the reset cycle. Can do.

本発明による制御装置は、処理部と、処理部とバスを介して接続されている主記憶装置であって、一又は二以上のソースコードをコンパイルしたマシン語を分割することによって作成される複数のプログラムモジュール、複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報、及び、制御ソフトウェアを動作時にロードする主記憶装置と、処理部をリセットする処理部リセット手段と、を備え、制御ソフトウェアは、処理部に、複数のプログラムモジュールにおける第1のプログラムモジュールを実行するステップと、処理部のレジスタの情報を主記憶装置に保存するステップと、を実行させ、制御ソフトウェアは、処理部リセット手段が処理部をリセットした後、さらに、処理部に、主記憶装置に保存されているレジスタの情報を処理部のレジスタに保存するステップと、第1のプログラムモジュールの次に実行すべきと実行順序情報に定義されている第2のプログラムモジュールを実行するステップと、を実行させることができる。   A control device according to the present invention is a main storage device connected to a processing unit and the processing unit via a bus, and is created by dividing a machine language obtained by compiling one or more source codes. Program module, execution order information that defines the execution order of each of the plurality of program modules, a main storage device that loads the control software during operation, and a processing unit resetting unit that resets the processing unit. , Causing the processing unit to execute a step of executing the first program module of the plurality of program modules and a step of storing the register information of the processing unit in the main storage device. After resetting the processing unit, the register stored in the main storage device is further stored in the processing unit. And the step of executing the second program module defined in the execution order information to be executed next to the first program module can be executed. .

処理部リセット手段は、処理部が複数のプログラムモジュールの1つを実行するために費やすことができる時間である実行単位時間より長い時間である所定の周期で処理部をリセットすることができる。   The processing unit resetting unit can reset the processing unit at a predetermined cycle that is longer than an execution unit time that is a time that the processing unit can spend to execute one of the plurality of program modules.

本発明による制御装置において、制御ソフトウェアは、処理部に、第1のプログラムモジュールの実行が実行単位時間内に終了しない場合、処理部リセット手段による処理部のリセットを停止するステップを実行させるようにすることができる。   In the control device according to the present invention, the control software causes the processing unit to execute a step of stopping the resetting of the processing unit by the processing unit resetting unit when the execution of the first program module does not end within the execution unit time. can do.

本発明による制御装置において、制御ソフトウェアは、第2のプログラムモジュールが実行され、処理部リセット手段によって処理部がリセットされた後、処理部に、第2のプログラムモジュールが正常に終了したか否かを判定するステップと、第2のプログラムモジュールが正常に終了しなかった場合、主記憶装置に保存されているレジスタの情報を処理部のレジスタに保存するステップと、第2のプログラムモジュールを再度実行するステップと、を実行させるようにすることができる。   In the control device according to the present invention, after the second program module is executed and the processing unit is reset by the processing unit resetting means, the control software determines whether or not the second program module is normally terminated in the processing unit. And when the second program module does not end normally, the step of storing the register information stored in the main storage device in the register of the processing unit and the second program module are executed again. And the step of performing.

本発明による制御装置において、主記憶装置は、さらに、複数のプログラムモジュールそれぞれを実行する際に必要となるクロック数の推定値である推定実行クロック数を定義する推定実行クロック情報を動作時にロードし、制御ソフトウェアは、処理部に、第1のプログラムモジュールの推定実行クロック数と第2のプログラムモジュールの推定実行クロック数とを加えた値である加算クロック数と、実行単位クロック数とを比較するステップと、加算クロック数が実行単位クロック数より小さい場合、第1のプログラムモジュールの終了後、処理部をリセットすることなく、第2のプログラムモジュールを実行するステップと、を実行させるようにすることができる。   In the control device according to the present invention, the main storage device further loads estimated execution clock information defining an estimated execution clock number, which is an estimated value of the number of clocks required when executing each of the plurality of program modules, during operation. The control software compares the number of execution unit clocks with an added clock number that is a value obtained by adding the estimated execution clock number of the first program module and the estimated execution clock number of the second program module to the processing unit. When the number of clocks to be added is smaller than the number of execution unit clocks, the second program module is executed without resetting the processing unit after the end of the first program module. Can do.

本発明による制御装置において、制御ソフトウェアが、処理部に、処理部がリセットされる時間の間隔を変更するステップを実行させるようにすることができる。   In the control device according to the present invention, the control software can cause the processing unit to execute a step of changing an interval of time at which the processing unit is reset.

本発明による制御装置において、マシン語は、マシン語における1又は2以上の命令グループに基づいて、分割されているようにすることができる。   In the control device according to the present invention, the machine language may be divided based on one or more instruction groups in the machine language.

本発明による制御装置において、マシン語は、実行単位時間及び処理部のクロック周波数から計算される実行単位クロック数に基づいて、分割されているようにすることができる。   In the control device according to the present invention, the machine language can be divided based on the number of execution unit clocks calculated from the execution unit time and the clock frequency of the processing unit.

本発明による制御装置において、マシン語は、実行単位時間及び処理部のクロック周波数から計算される実行単位クロック数とマシン語における1又は2以上の命令グループとに基づいて、分割されているようにすることができる。   In the control device according to the present invention, the machine language is divided based on the number of execution unit clocks calculated from the execution unit time and the clock frequency of the processing unit and one or more instruction groups in the machine language. can do.

本発明による制御装置は、マイクロコンピュータであるようにすることができる。   The control device according to the present invention may be a microcomputer.

本発明による制御装置であるマイクロコンピュータが、ワンチップ上で実装されるようにすることができる。   The microcomputer which is the control device according to the present invention can be mounted on one chip.

本発明による制御装置は、処理部が、中央処理装置(CPU)であるようにすることができる。   In the control device according to the present invention, the processing unit may be a central processing unit (CPU).

本発明による制御装置は、主記憶装置が、RAMであるようにすることができる。   In the control device according to the present invention, the main storage device may be a RAM.

本発明による制御装置は、制御ソフトウェアが、オペレーティングシステム(OS)であるようにすることができる。   The control device according to the present invention may be configured such that the control software is an operating system (OS).

本発明による制御装置は、主記憶装置が、複数の時点における処理部のレジスタの情報を保存するようにすることができる。   In the control device according to the present invention, the main storage device can store the register information of the processing unit at a plurality of points in time.

本発明によるコンピュータプログラムのコンパイル方法は、一又は二以上のソースコードをマシン語にコンパイルするステップと、マシン語を実行するために必要なクロック数を計算するステップと、マシン語における1又は2以上の命令グループを単位として、マシン語を分割し、さらに、必要なクロック数がマシン語の1つのグループを実行するために費やすことができる時間である実行単位時間に基づく実行単位クロック数より小さい又は等しくなるようマシン語を分割し、複数のプログラムモジュールを作成するステップと、複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、を含む。   A computer program compiling method according to the present invention includes a step of compiling one or more source codes into a machine language, a step of calculating the number of clocks required to execute the machine language, and one or more of the machine language. Less than the number of execution unit clocks based on the execution unit time, which is the time that can be spent to execute one group of machine language. The machine language is divided so as to be equal to each other, and a plurality of program modules are created, and execution order information that defines the execution order of each of the plurality of program modules is created.

本発明によるコンピュータプログラムのコンパイル方法は、マシン語を実行するコンピュータが有する処理部のクロック周波数と実行単位時間とに基づいて、実行単位クロック数を計算するステップをさらに有するようにすることができる。   The computer program compiling method according to the present invention may further include a step of calculating the number of execution unit clocks based on the clock frequency and execution unit time of the processing unit included in the computer executing the machine language.

本発明によるコンピュータプログラムのコンパイル方法は、複数のプログラムモジュールそれぞれを実行する際に必要となるクロック数を推定し、各推定実行クロック数を定義する推定実行クロック情報を作成するステップをさらに有するようにすることができる。   The computer program compiling method according to the present invention further includes a step of estimating the number of clocks required for executing each of the plurality of program modules and creating estimated execution clock information defining each estimated execution clock number. can do.

本発明によるコンピュータプログラムのコンパイル方法は、連続して実行される2以上のプログラムモジュールの推定実行クロック数の合計が、実行単位クロック数より小さい場合、2以上のプログラムモジュールを併合するステップをさらに有するようにすることができる。   The compiling method of the computer program according to the present invention further includes a step of merging two or more program modules when the total number of estimated execution clocks of two or more program modules executed continuously is smaller than the number of execution unit clocks. Can be.

本発明によるコンピュータプログラムのコンパイル方法は、一又は二以上のソースコードをマシン語にコンパイルするステップと、マシン語を実行するために必要なクロック数を計算するステップと、必要なクロック数がマシン語の1つのグループを実行するために費やすことができる時間である実行単位時間に基づく実行単位クロック数より小さい又は等しくなるようマシン語を分割し、複数のプログラムモジュールを作成するステップと、複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、を含むようにすることができる。   A computer program compiling method according to the present invention includes a step of compiling one or more source codes into a machine language, a step of calculating a clock number necessary for executing the machine language, and a necessary clock number being a machine language. Dividing the machine language so as to be smaller than or equal to the number of execution unit clocks based on the execution unit time, which is the time that can be spent to execute one group, and creating a plurality of program modules; and a plurality of programs Creating execution order information that defines the execution order of each module.

本発明によるコンピュータプログラムのコンパイル方法は、マシン語を実行するコンピュータが有する処理部のクロック周波数と実行単位時間とに基づいて、実行単位クロック数を計算するステップをさらに含むようにすることができる。   The computer program compiling method according to the present invention may further include a step of calculating the number of execution unit clocks based on the clock frequency and execution unit time of the processing unit included in the computer executing the machine language.

本発明によるコンピュータプログラムのコンパイル方法は、一又は二以上のソースコードをマシン語にコンパイルするステップと、マシン語における1又は2以上の命令グループを単位として、マシン語を分割し、複数のプログラムモジュールを作成するステップと、複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、を含むようにすることができる。   A computer program compiling method according to the present invention includes a step of compiling one or more source codes into a machine language, and dividing the machine language in units of one or two or more instruction groups in the machine language. And a step of creating execution order information that defines the execution order of each of the plurality of program modules.

本発明によるコンパイラは、上述のコンピュータプログラムのコンパイル方法を用いることができる。   The compiler according to the present invention can use the computer program compiling method described above.

マイクロコンピュータのCPUで致命的なエラーが発生しているのを早期に検出し、致命的なエラーからの復帰を可能とすることによって、マイクロコンピュータを用いた応用装置が異常な動作時には危険であったりする誤動作を大幅に低減することができる。   By detecting the occurrence of a fatal error in the CPU of the microcomputer at an early stage and enabling recovery from the fatal error, it is dangerous when an application device using the microcomputer operates abnormally. Malfunctions can be greatly reduced.

特に、自動車、飛行機、船舶、産業用ロボットなどの分野で用いられる機械系を制御する機器において、それら機器の誤動作は大事故に繋がる恐れがある(例えば、自動車のブレーキ制御やステアリング制御など)。本発明によるマイクロコンピュータのCPUの致命的なエラーからの復帰に必要な時間は、機械系を制御する機器における誤動作の検出及びその誤動作からの復帰に必要な時間と比較してはるかに短い。よって、マイクロコンピュータのCPUの致命的なエラーに起因するこれら機器の誤動作の検出及びその誤動作から復帰させるための処理を、機器ではなくマイクロコンピュータで行うことは有用である。   In particular, in devices that control mechanical systems used in the fields of automobiles, airplanes, ships, industrial robots, etc., malfunctions of these devices may lead to major accidents (for example, vehicle brake control and steering control). The time required to recover from a fatal error of the CPU of the microcomputer according to the present invention is much shorter than the time required to detect a malfunction in the device controlling the mechanical system and to recover from the malfunction. Therefore, it is useful to detect a malfunction of these devices due to a fatal error of the CPU of the microcomputer and to perform a process for returning from the malfunction by using the microcomputer instead of the device.

また、上記分野において、電気的なノイズなどの致命的なエラーを生じさせる原因は他の分野の機器と比べてより多く発生する。したがって、機械系を制御する機器に本発明を用いることによって、電気的なノイズなどのための従前の多くの対策を大幅に軽減でき、さらに、従前より強固な対策が行えるため、コスト低下と信頼性の向上を併せて図ることができる。また、マイクロコンピュータのCPUにおいて致命的なエラーが継続的に発生している場合、継続的なCPUの致命的なエラーを検出し、その検出結果に基づいて、機器の誤動作を警告するための情報を入出力インタフェースを介して提供することもできる。   Also, in the above field, there are more causes of fatal errors such as electrical noise than in other fields. Therefore, by using the present invention for equipment that controls mechanical systems, many conventional measures for electrical noise can be greatly reduced, and more robust measures can be taken. It is possible to improve the performance. Further, when a fatal error continuously occurs in the CPU of the microcomputer, information for detecting a continuous CPU fatal error and warning the malfunction of the device based on the detection result. Can also be provided via an input / output interface.

更に、本発明は、マイクロコンピュータのCPUで致命的なエラーが発生した場合、マイクロコンピュータ全体をリセットするのではなく、CPUのみをリセットすることから、致命的なエラーからの復帰を極めて短い時間で行うことができる。また、本発明は、CPUで致命的なエラーが発生した時に実行されていた応用プログラムを中断した後、CPUをリセットし、そして、その致命的なエラーが発生する前の時点から応用プログラムの実行を再開することができる。   Furthermore, according to the present invention, when a fatal error occurs in the CPU of the microcomputer, the entire microcomputer is not reset, but only the CPU is reset, so that the recovery from the fatal error can be performed in a very short time. It can be carried out. The present invention also interrupts the application program that was executed when a fatal error occurred in the CPU, resets the CPU, and executes the application program from the time before the fatal error occurred. Can be resumed.

本発明の活用が期待される分野における一例を挙げれば、エレベーターが動作中に、落雷、電源のノイズ、設計上の不備によるノイズによって、エレベーターの制御を行うマイクロコンピュータのCPUに致命的なエラーが発生し、そして、そのCPUによってエレベーターが誤動作した場合であっても、エレベーターのマイクロコンピュータに本発明のマイクロコンピュータを採用することによって、エレベーターを安定した状態の動作に極めて短い時間で復帰させることができる。   An example in a field where the present invention is expected to be used is that a fatal error occurs in the CPU of the microcomputer that controls the elevator due to lightning, power supply noise, and noise due to design deficiencies while the elevator is operating. Even if the elevator malfunctions due to the CPU, the microcomputer of the present invention can be used for the elevator microcomputer to restore the elevator to a stable operation in a very short time. it can.

従来のコンパイラによるプログラムモジュールの作成過程の概要を示した図である。It is the figure which showed the outline | summary of the creation process of the program module by the conventional compiler. 本発明の一実施例に係るコンパイラによるプログラムモジュールの作成過程の概要を示した図である。It is the figure which showed the outline | summary of the creation process of the program module by the compiler which concerns on one Example of this invention. 本発明の一実施例に係るコンパイラの動作を示したフロー図である。It is the flowchart which showed the operation | movement of the compiler which concerns on one Example of this invention. 実行順序情報についてのテーブル構造を示した図である。It is the figure which showed the table structure about execution order information. コンパイラを実現するためのコンピュータ端末の全体を示したブロック図である。It is the block diagram which showed the whole computer terminal for implement | achieving a compiler. 本発明の一実施例に係るマイクロコンピュータの全体を示したブロック図である。1 is a block diagram showing an entire microcomputer according to an embodiment of the present invention. 第1の実施例によるマイクロコンピュータの動作を示したフロー図である。It is the flowchart which showed the operation | movement of the microcomputer by a 1st Example. 第1の実施例によるマイクロコンピュータの動作を示したフロー図である。It is the flowchart which showed the operation | movement of the microcomputer by a 1st Example. CPUの制御の推移、並びに、そのCPUのレジスタ及びRAMに保存されている情報の推移を示す第1の実施例についてのタイムチャートである。It is a time chart about the 1st example which shows transition of control of CPU, and transition of information stored in the register and RAM of the CPU. プログラムモジュールの併合前後のCPUの制御の推移を示す第2の実施例についてのタイムチャートである。It is a time chart about the 2nd example which shows transition of control of CPU before and after merge of a program module.

図1は従来のコンパイラによるプログラムモジュールの作成過程の概要を示した図である。従来技術において、コンパイラ105は、ソースコード(ソースプログラム、コンピュータプログラム、原始プログラムなどとも称される)100をコンパイルすることによって、目的プログラム(オブジェクトモジュールなどとも称される)105を作成する。そして、リンカ(連係編集プログラム、リンケージエディタなどとも称される)120が目的プログラム110とライブラリ115などをリンク(連係編集とも称される)させることによって、通常1つのプログラムモジュール(実行モジュール、実行形式モジュール、実行可能モジュール、ロードモジュールなどとも称される)125を作成する。   FIG. 1 is a diagram showing an outline of a process for creating a program module by a conventional compiler. In the prior art, the compiler 105 creates a target program (also referred to as an object module) 105 by compiling a source code (also referred to as a source program, a computer program, or a source program) 100. A linker (also referred to as linkage editing program, linkage editor, etc.) 120 links the target program 110 with the library 115 (also referred to as linkage editing), so that usually one program module (execution module, execution format). 125) (also referred to as modules, executable modules, load modules, etc.).

図2は本発明の一実施例に係るコンパイラによるプログラムモジュールの作成過程の概要を示した図である。従来技術では、1つのプログラムモジュール125が作成されているのに対し、本実施例では、リンカ220によって、複数のプログラムモジュール225乃至240が作成される。   FIG. 2 is a diagram showing an outline of a process for creating a program module by a compiler according to an embodiment of the present invention. In the prior art, one program module 125 is created, whereas in the present embodiment, a plurality of program modules 225 to 240 are created by the linker 220.

本実施例では、複数のプログラムモジュールを作成することによって、それらモジュールを実行するときに、プログラムモジュール1 225が完了した後、かつ、プログラムモジュール2 230を実行するまでの間の時間に、CPUをリセットするなどのプログラムモジュールの処理とは異なる処理の実行が可能となる。   In this embodiment, by creating a plurality of program modules, when executing these modules, the CPU is executed after the program module 1 225 is completed and before the program module 2 230 is executed. It is possible to execute processing different from the processing of the program module such as resetting.

通常、プログラムモジュールは、コンパイル及びリンクなどを行うことによって作成される。しかしながら、ソースコードからプログラムモジュールの作成までの過程は、用いるコンピュータ言語などに依存して変化することがある。したがって、本明細書及び特許請求の範囲において、特に言及が無い限り、ソースコードからプログラムモジュールを作成する過程は、コンパイルによって行われるものとして説明する。   Usually, a program module is created by compiling and linking. However, the process from the source code to the creation of the program module may change depending on the computer language used. Therefore, in the present specification and claims, unless otherwise stated, the process of creating a program module from source code will be described as being performed by compilation.

以下、プログラムモジュールを分割することを可能にするコンパイラ及びそのコンパイラによって作成されたプログラムモジュールの制御方法、及び、その制御方法を実現するマイクロコンピュータの動作について説明する。   Hereinafter, a compiler that makes it possible to divide a program module, a control method of a program module created by the compiler, and an operation of a microcomputer that realizes the control method will be described.

コンパイラ
図3は、本発明の一実施例に係るコンパイラの動作を示したフロー図である。最初にコンパイラは、応用プログラム(アプリケーションプログラム)などのソースコードを読み取り(ステップ310)、ソースコードをコンパイルする(ステップ313)。これにより、目的プログラムが生成される。コンパイルは、例えば、ソースコードの字句解析、構文解析、及び、意味解析などを行う。
Compiler FIG. 3 is a flowchart showing the operation of the compiler according to one embodiment of the present invention. First, the compiler reads source code such as an application program (application program) (step 310) and compiles the source code (step 313). As a result, a target program is generated. Compiling includes, for example, lexical analysis, syntax analysis, and semantic analysis of the source code.

コンパイラは、目的プログラム(又はソースコード)をマシン語(機械語、マシンコードなどとも称される)に変換する(ステップ315)。ここで、マシン語とは、CPUなどのプロセッサが直接解釈及び実行できる言語である。さらに、ステップ315において、コンパイラは、必要に応じて、マシン語とライブラリなどをリンクさせる。   The compiler converts the target program (or source code) into machine language (also referred to as machine language or machine code) (step 315). Here, the machine language is a language that can be directly interpreted and executed by a processor such as a CPU. Further, in step 315, the compiler links the machine language and the library as necessary.

コンパイラは、実行単位時間及びCPUのクロック周波数に基づいて、実行単位クロック数を計算する(ステップ320)。具体的には、実行単位時間にCPUのクロック周波数を乗算することによって、実行単位クロック数を得ることができる。ここで、実行単位時間とは、マシン語を実行するために費やすことができる時間を意味する。また、実行単位時間は、CPUがリセットされる所定の周期(後述する)より短い時間である。例えば、実行単位時間は、マシン語を実行するための前処理及び後処理に必要な時間を所定の周期から差し引いた時間である。CPUのクロック周波数は、プログラムモジュールを実装するマイクロコンピュータにおけるCPUの周波数である必要がある。一実施例において、特定の周波数のCPUを有するマイクロコンピュータにプログラムモジュールを実装する場合、実行単位クロック数は固定の値とすることができる。この場合、固定の値である実行単位クロック数は、特定の周波数及び所定の実行単位時間に基づく値とすることができる。   The compiler calculates the number of execution unit clocks based on the execution unit time and the CPU clock frequency (step 320). Specifically, the execution unit clock number can be obtained by multiplying the execution unit time by the clock frequency of the CPU. Here, the execution unit time means a time that can be spent for executing the machine language. The execution unit time is a time shorter than a predetermined cycle (described later) when the CPU is reset. For example, the execution unit time is a time obtained by subtracting a time required for pre-processing and post-processing for executing a machine language from a predetermined period. The CPU clock frequency needs to be the CPU frequency in the microcomputer on which the program module is mounted. In one embodiment, when a program module is mounted on a microcomputer having a CPU having a specific frequency, the number of execution unit clocks can be a fixed value. In this case, the fixed number of execution unit clocks can be a value based on a specific frequency and a predetermined execution unit time.

実行単位クロック数の計算例として、実行単位時間が20ms、CPUのクロック周波数が1GHzである場合、実行単位クロック数は、(0.02)*(1,000,000,000)によって、20,000,000となる。   As an example of calculation of the number of execution unit clocks, when the execution unit time is 20 ms and the CPU clock frequency is 1 GHz, the number of execution unit clocks is 20, by (0.02) * (1,000,000,000). 000,000.

コンパイラは、命令グループを単位として、マシン語を分割する(ステップ325)。命令グループの例としては、1つの命令グループを、複数のソースコード、1つのソースコード、ソースコードにおける1つの条件分岐命令又は繰返し命令、又は、下位の関数などに対応させることができる。   The compiler divides the machine language in units of instruction groups (step 325). As an example of the instruction group, one instruction group can correspond to a plurality of source codes, one source code, one conditional branch instruction or repeated instruction in the source code, a lower function, or the like.

命令グループについて、1つのソースコードであるサンプルソースコード1を用いて説明する。
サンプルソースコード1
1 int exampleFunc1 (int argNumber) {
2 int n = 50;
3 int a = 2;
4
5 if (argNumber != 0) {
6 n = n/argNumber;
7 }
8 else
9 {
10 n = n + 1;
11 }
12
13 for (i = 0; i < n; i++) {
14 printf (n);
15 }
16
17 for (i = 0; i < a; i++) {
18 printf (n);
19 }
20
21 return 0;
22 }
The instruction group will be described using sample source code 1 which is one source code.
Sample source code 1
1 int exampleFunc1 (int argNumber) {
2 int n = 50;
3 int a = 2;
Four
5 if (argNumber! = 0) {
6 n = n / argNumber;
7}
8 else
9 {
10 n = n + 1;
11}
12
13 for (i = 0; i <n; i ++) {
14 printf (n);
15}
16
17 for (i = 0; i <a; i ++) {
18 printf (n);
19}
20
21 return 0;
twenty two }

1つのソースコードが命令グループの1つとする場合、上記サンプルコードの1乃至22行目に相当するマシン語全てが命令グループの1つに相当する。   When one source code is one instruction group, all machine languages corresponding to the first to twenty-second lines of the sample code correspond to one instruction group.

条件分岐命令が命令グループの1つとする場合、条件分岐命令であるif文の5乃至11行目に相当するマシン語を1つの命令グループとする。また、5乃至7行目に相当するマシン語を1つの命令グループ、8乃至11行目に相当するマシン語を1つの命令グループとしてもよい。   When the conditional branch instruction is one of the instruction groups, the machine language corresponding to the 5th to 11th lines of the if statement that is the conditional branch instruction is set as one instruction group. The machine language corresponding to the 5th to 7th lines may be set as one instruction group, and the machine language corresponding to the 8th to 11th lines may be set as one instruction group.

繰返し命令が命令グループの1つとする場合、繰返し命令であるfor文の13乃至15行目に相当するマシン語を1つの命令グループとする。また、17乃至19行目に記載されている繰返し命令は、変数aが2であることから(つまり、変数aは静的な値)、この繰返し命令は、必ず2回繰り返される。このような場合、2回分の繰返し命令を1つの命令グループとしてもよい。   When the repeat instruction is one of the instruction groups, the machine language corresponding to the 13th to 15th lines of the for statement that is the repeat instruction is set as one instruction group. In the repeat instruction described in the 17th to 19th lines, since the variable a is 2 (that is, the variable a is a static value), this repeat instruction is always repeated twice. In such a case, two repeated instructions may be used as one instruction group.

下位の関数が命令グループの1つとする場合、14行目に記載されている関数「printf」に相当するマシン語を1つの命令グループとする。   When the lower function is one of the instruction groups, the machine language corresponding to the function “printf” described in the 14th line is set as one instruction group.

コンパイラは、分割されたマシン語を実行するのに必要なクロック数を計算する(ステップ330)。マシン語において、各命令を実行するのに必要なクロック数は既知である。したがって、各命令に対応するクロック数から分割されたマシン語の全部又は一部を実行するのに必要なクロック数を計算することができる。   The compiler calculates the number of clocks required to execute the divided machine language (step 330). In machine language, the number of clocks required to execute each instruction is known. Therefore, the number of clocks required to execute all or part of the machine language divided from the number of clocks corresponding to each instruction can be calculated.

他の実施例において、各命令を実行するのに必要なクロック数の対応テーブルを予め作成しておき、コンパイラは、対応テーブルを参照することによって、クロック数を計算することができる。   In another embodiment, a correspondence table for the number of clocks necessary to execute each instruction is created in advance, and the compiler can calculate the number of clocks by referring to the correspondence table.

コンパイラは、実行単位クロック数に基づいて、ステップ325で分割されたマシン語をさらに分割する(ステップ335)。ステップ325で分割されたマシン語を実行するのに必要なクロック数が実行単位クロック数より大きい場合、ステップ325で分割されたマシン語をさらに分割する。他の実施例として、ステップ335において分割されたマシン語を実行するのに必要なクロック数が実行単位クロック数より大きい場合は、マシン語を実行するのに必要なクロック数が実行単位クロック数と等しい及び/又はより小さくなるまで、ステップ330及び335を繰り返してもよい。   The compiler further divides the machine language divided at step 325 based on the number of execution unit clocks (step 335). If the number of clocks required to execute the machine word divided in step 325 is larger than the number of execution unit clocks, the machine word divided in step 325 is further divided. As another example, if the number of clocks required to execute the machine language divided in step 335 is greater than the number of execution unit clocks, the number of clocks required to execute the machine language is equal to the number of execution unit clocks. Steps 330 and 335 may be repeated until equal and / or smaller.

他の実施例において、コンパイラは、ステップ325又はステップ335のどちらか一方のみを実行するようにしてもよい。これにより、マシン語は、命令グループ又は実行単位クロック数のどちらか一方のみに基づいて分割される。   In other embodiments, the compiler may perform only one of step 325 or step 335. As a result, the machine language is divided based only on either the instruction group or the number of execution unit clocks.

コンパイラは、分割したマシン語から複数のプログラムモジュールを作成する(ステップ340)。コンパイラは、各プログラムモジュールの実行順序を決定し、実行順序情報を作成する(ステップ345)。そして、コンパイラは、複数のプログラムモジュールそれぞれに相当するマシン語を実行するのに必要なクロック数を推定実行クロック数として計算し、推定実行クロック情報を作成する(ステップ350)。   The compiler creates a plurality of program modules from the divided machine language (step 340). The compiler determines the execution order of each program module and creates execution order information (step 345). Then, the compiler calculates the number of clocks necessary to execute the machine language corresponding to each of the plurality of program modules as the estimated execution clock number, and creates estimated execution clock information (step 350).

各プログラムモジュールは、それ自体の実行順序情報及び/又は推定実行クロック情報を有するようにすることができる。他の実施例において、実行順序情報及び/又は推定実行クロック情報は、各プログラムモジュールに関連付けされ、後述する図6に記載のマイクロコンピュータ600のRAM601又はROM610に専用テーブルとして保存される。   Each program module may have its own execution order information and / or estimated execution clock information. In another embodiment, the execution order information and / or the estimated execution clock information is associated with each program module and stored as a dedicated table in the RAM 601 or the ROM 610 of the microcomputer 600 shown in FIG.

ステップ325において、1つのソースコードが1つの命令グループとして定義された場合、実行順序は、第1のプログラムモジュールに「1」、第1のプログラムモジュールの次に実行されるモジュールである第2のモジュールに「2」が設定される。また、ステップ335において、実行単位クロック数に基づいて、第1のプログラムモジュールがさらに分割された場合、実行順序は、「1−1」、「1−2」などのように設定される。   In step 325, when one source code is defined as one instruction group, the execution order is “1” for the first program module, and the second program that is executed next to the first program module. “2” is set in the module. In step 335, when the first program module is further divided based on the number of execution unit clocks, the execution order is set to “1-1”, “1-2”, and the like.

ステップ325において、1つの条件分岐命令が1つの命令グループとして定義された場合を以下のサンプルソースコード2を用いて説明する。例えば、1乃至3行目に相当するマシン語を含むプログラムモジュールの実行順序は「1」、4乃至6行目に相当する実行順序は「2」、7乃至10行目に相当する実行順序は「3」、11乃至12行目に相当する実行順序は「4」などとすることができる。
サンプルソースコード2
1 int exampleFunc2 (int argNumber) {
2 int n = 50;
3 int a = 2;
4 if (argNumber != 0) {
5 n = n/argNumber;
6 }
7 else
8 {
9 n = n + 1;
10 }
11 return 0;
12 }
A case where one conditional branch instruction is defined as one instruction group in step 325 will be described using the following sample source code 2. For example, the execution order of the program modules including the machine language corresponding to the first to third lines is “1”, the execution order corresponding to the fourth to sixth lines is “2”, and the execution order corresponding to the seventh to tenth lines is “3”, the execution order corresponding to the 11th to 12th lines can be “4” or the like.
Sample source code 2
1 int exampleFunc2 (int argNumber) {
2 int n = 50;
3 int a = 2;
4 if (argNumber! = 0) {
5 n = n / argNumber;
6}
7 else
8 {
9 n = n + 1;
Ten }
11 return 0;
12}

ステップ325において、1つの繰返し命令が1つの命令グループとして定義された場合の例を以下のサンプルソースコード3を用いて説明する。例えば、1乃至2行目に相当するマシン語を含むプログラムモジュールの実行順序は「1」、3乃至5行目に相当する実行順序は「2」、6乃至7行目に相当する実行順序は「3」とすることができる。さらに、サンプルソースコード3の3行目に「for (i = 0; i < 2; i++)」と記載されているように、iが「0」及び「1」の時に3乃至5行目の繰返し命令が実行されることから、この繰返し命令の処理は必ず2回実行される。したがって、3乃至5行目において、1回目に実行されるマシン語を含むプログラムモジュールの実行順序は「2−1」、2回目に相当する実行順序は「2−2」とすることができる。
サンプルソースコード3
1 int exampleFunc3 (int argNumber) {
2 int n = 50;
3 for (i = 0; i < 2; i++) {
4 printf (n);
5 }
6 return 0;
7 }
An example in which one repeat instruction is defined as one instruction group in step 325 will be described using the following sample source code 3. For example, the execution order of the program modules including the machine language corresponding to the first to second lines is “1”, the execution order corresponding to the third to fifth lines is “2”, and the execution order corresponding to the sixth to seventh lines is It can be “3”. Furthermore, as described in “for (i = 0; i <2; i ++)” on the third line of the sample source code 3, when i is “0” and “1”, the third to fifth lines Since the repeat instruction is executed, the process of the repeat instruction is always executed twice. Therefore, in the third to fifth lines, the execution order of the program module including the machine language executed for the first time can be “2-1”, and the execution order corresponding to the second time can be “2-2”.
Sample source code 3
1 int exampleFunc3 (int argNumber) {
2 int n = 50;
3 for (i = 0; i <2; i ++) {
4 printf (n);
Five }
6 return 0;
7}

さらに、繰返し命令の実行回数が動的に変化する場合の例を以下のサンプルソースコード4を用いて説明する。サンプルソースコード4の例では、2乃至4行目の繰返しは、変数iが引数argNumberの値と等しくなった時に繰返しを止めるが、引数argNumberの値は、関数exampleFunc4をコールする(実行する)時に確定する。つまり、引数argNumberの値は動的に変化する。1行目に相当するマシン語を含むプログラムモジュール(プログラムモジュール1)の実行順序は「1」、2乃至4行目に相当(プログラムモジュール2)する実行順序は「2」、5乃至6行目に相当(プログラムモジュール3)する実行順序は「3」とすることができる。そして、実行順序情報に、2乃至4行目に相当するマシン語を含むプログラムモジュールの処理内容(又は処理回数)及び実行時間は実行時に動的に変化することを示すフラグを付加することができる。例えば、図4のようなテーブル構造によって情報を保存することができ、上記プログラムモジュール1乃至3の識別子には、それぞれ、exampleFunc4-1、exampleFunc4-2、exampleFunc4-3を設定し、2乃至4行目に相当するプログラムモジュールには、実行時に動的に変化することを示す動的変化フラグをオン(値が「1」)に設定することができる。
サンプルソースコード4
1 int exampleFunc4 (int argNumber) {
2 for (i = 0; i <argNumber; i++) {
3 printf (argNumber);
4 }
5 return 0;
6 }
Further, an example in the case where the number of executions of the repeat instruction dynamically changes will be described using the following sample source code 4. In the example of the sample source code 4, the repetition of the second to fourth lines stops when the variable i becomes equal to the value of the argument argNumber, but the value of the argument argNumber is set when the function exampleFunc4 is called (executed) Determine. In other words, the value of the argument argNumber changes dynamically. The execution order of the program module (program module 1) including the machine language corresponding to the first line is “1”, the execution order corresponding to the second to fourth lines (program module 2) is “2”, and the fifth to sixth lines. The execution order corresponding to (program module 3) can be “3”. Then, a flag indicating that the processing contents (or the number of processing times) and the execution time of the program module including the machine language corresponding to the second to fourth lines and the execution time change dynamically at the time of execution can be added to the execution order information. . For example, information can be stored in a table structure as shown in FIG. 4, and exampleFunc4-1, exampleFunc4-2, and exampleFunc4-3 are set in the identifiers of the program modules 1 to 3, respectively. In the program module corresponding to the eye, a dynamic change flag indicating that the program module dynamically changes at the time of execution can be set to ON (value is “1”).
Sample source code 4
1 int exampleFunc4 (int argNumber) {
2 for (i = 0; i <argNumber; i ++) {
3 printf (argNumber);
Four }
5 return 0;
6}

他の実施例において、図4のテーブルに記載のプログラムモジュール識別子及び実行順序を組み合わせた値を実行順序として用いてもよい。これにより、この実行順序は、ユニークな値とすることができる。   In another embodiment, a value obtained by combining the program module identifier and the execution order described in the table of FIG. 4 may be used as the execution order. Thereby, this execution order can be set to a unique value.

他の実施例において、ステップ350の処理の後、2以上のプログラムモジュールの推定実行クロック数の合計が、実行単位クロック数より小さい場合、2以上のプログラムモジュールを併合してもよい。また、2以上のプログラムモジュールのいずれかの処理内容(又は処理回数)及び実行時間が実行時に動的に変化する(図4に示す動的変化フラグがオンである)場合、プログラムモジュールの併合を中止することができる。   In another embodiment, after the process of step 350, two or more program modules may be merged if the total number of estimated execution clocks of two or more program modules is smaller than the number of execution unit clocks. In addition, when the processing contents (or the number of processes) and execution time of any of two or more program modules change dynamically at the time of execution (the dynamic change flag shown in FIG. 4 is ON), the program modules are merged. Can be canceled.

他の実施例において、コンパイラは、後述する図6に記載のマイクロコンピュータにおいて用いられるようにすることができる。コンパイラ及びコンパイラが用いる各種パラメータなどは、マイクロコンピュータの主記憶装置(RAM)やROMに予め保存しておくことができる。   In another embodiment, the compiler can be used in the microcomputer shown in FIG. 6 described later. The compiler and various parameters used by the compiler can be stored in advance in a main memory (RAM) or ROM of the microcomputer.

他の実施例において、コンパイラ及びコンパイラが用いる各種パラメータなどは、図5に記載されているようなコンピュータ端末用のRAM525、ROM530、ハードディスク535、又は、リムーバブルディスク540など(以下、記憶装置550とする)に保存されていてもよい。コンピュータ端末用CPU505が、ソフトウェアとして記憶装置550に保存されているコンパイラを実行することによって、記憶装置550に保存されているソースコードをコンパイルし、複数のプログラムモジュールを作成し、記憶装置550のいずれかに保存することができる。さらに、コンピュータ端末500は、コンパイルするソースコード及び/又は複数のプログラムモジュールをリムーバブルディスク540に保存する(及び/又はディスク540から読み取る)ことができる。   In another embodiment, the compiler and various parameters used by the compiler are a RAM 525, a ROM 530, a hard disk 535, a removable disk 540, or the like (hereinafter referred to as a storage device 550) as shown in FIG. ) May be stored. The computer terminal CPU 505 executes a compiler stored as software in the storage device 550 to compile the source code stored in the storage device 550 to create a plurality of program modules. Can be saved. Further, the computer terminal 500 can store (and / or read from) the removable disk 540 the source code to be compiled and / or a plurality of program modules.

コンピュータ端末500は、コンピュータ端末用入力装置510及び表示装置515を有する。コンピュータ端末用入力装置510の例としては、キーボード、ポインティングデバイス、音声認識入力装置などがある。これにより、ユーザは、コンパイルの実行の命令やコンパイル時に用いられるパラメータ(実行単位時間、CPUのクロック周波数など)の入力を行うことができる。表示装置515の例としては、ブラウン管(CRT)ディスプレイ、液晶デイスプレイ(LCD)などがある。これにより、ユーザは、表示装置515に提示されるグラフィックユーザインタフェースを介して、コンパイラを操作することができる。   The computer terminal 500 includes a computer terminal input device 510 and a display device 515. Examples of the computer terminal input device 510 include a keyboard, a pointing device, and a voice recognition input device. Thus, the user can input a compile execution instruction and parameters used at the time of compile (execution unit time, CPU clock frequency, etc.). Examples of the display device 515 include a cathode ray tube (CRT) display and a liquid crystal display (LCD). Thus, the user can operate the compiler via the graphic user interface presented on the display device 515.

コンピュータ端末500は、入出力インタフェース545を有し、このインタフェースを介して図6に記載の入出力ポート625に接続することができる。これにより、コンピュータ端末500上の入力装置510や表示装置515などの資源を用いて、マイクロコンピュータ600上でコンパイルを実行することができる。   The computer terminal 500 has an input / output interface 545, and can be connected to the input / output port 625 shown in FIG. 6 via this interface. Thus, compilation can be executed on the microcomputer 600 using resources such as the input device 510 and the display device 515 on the computer terminal 500.

本実施例の説明では、説明を理解し易くするために、複数のプログラムモジュールのファイルを物理的に生成する(例えば、図2の225乃至240参照)実施例を用いた。しかしながら、当業者であれば理解可能であるように、区切り文字などの所定の規則を用いて、プログラムモジュールそれぞれの境界を明らかにすることによって、1つの物理ファイルを論理的に複数のプログラムモジュールとして用いることもできる。   In the description of the present embodiment, in order to make the description easier to understand, a file of a plurality of program modules is physically generated (for example, see 225 to 240 in FIG. 2). However, as can be understood by those skilled in the art, one physical file is logically divided into a plurality of program modules by clarifying the boundaries of each program module using predetermined rules such as delimiters. It can also be used.

マイクロコンピュータMicrocomputer

図6は、本発明の一実施例に係るマイクロコンピュータの全体を示したブロック図である。ここで、マイクロコンピュータ600は、中央処理装置(CPU)601、主記憶装置(RAM)605、ROM610、通信用回路615、ユニバーサルカウンタタイマ620、入出力ポート625、パワースイッチ627、論理和回路(OR回路)630、システムリセット入力635、CPUリセット入力637、クロック発生回路640、タイマカウンタ回路645、違法命令及び無効命令検出回路655、領域外アクセス検出回路660、ウオッチドッグ回路665、電源監視回路670を備える。マイクロコンピュータ600の各要素は、必要に応じて、バスと接続されている。一実施例において、マイクロコンピュータは、ワンチップ上で実装することができる。   FIG. 6 is a block diagram showing the whole microcomputer according to an embodiment of the present invention. Here, the microcomputer 600 includes a central processing unit (CPU) 601, a main storage device (RAM) 605, a ROM 610, a communication circuit 615, a universal counter timer 620, an input / output port 625, a power switch 627, an OR circuit (OR). Circuit) 630, system reset input 635, CPU reset input 637, clock generation circuit 640, timer counter circuit 645, illegal instruction and invalid instruction detection circuit 655, out-of-area access detection circuit 660, watchdog circuit 665, power supply monitoring circuit 670 Prepare. Each element of the microcomputer 600 is connected to a bus as necessary. In one embodiment, the microcomputer can be implemented on a single chip.

システムリセット入力635は、電源が投入されたときなどに、システムリセット用信号を発生させ、システムリセット用バス675を介してシステムリセット用信号を送信する。システムリセット用信号は、マイクロコンピュータ全体をリセットさせるための信号である。システムリセット用信号は、CPU601のみではなく、例えば、入出力ポート625、通信回路615、ユニバーサルカウンタタイマ620などをリセットするためにも用いられる。   The system reset input 635 generates a system reset signal when the power is turned on, and transmits the system reset signal via the system reset bus 675. The system reset signal is a signal for resetting the entire microcomputer. The system reset signal is used not only to reset the CPU 601 but also, for example, to reset the input / output port 625, the communication circuit 615, the universal counter timer 620, and the like.

CPUリセット入力637は、CPUリセットを発生させ、CPUリセット用バス680を介してシステムリセット用信号を送信する。CPUリセットは、CPUのみをリセットさせるための信号である。   The CPU reset input 637 generates a CPU reset and transmits a system reset signal via the CPU reset bus 680. The CPU reset is a signal for resetting only the CPU.

違法命令及び無効命令検出回路655、及び、領域外アクセス検出回路660は、それぞれ、CPU601が正常に動作しているか否かを判定する。CPU601が正常に動作していないと判定された場合、違法命令及び無効命令検出回路655、又は、領域外アクセス検出回路660は、CPUリセット用バス680を介してCPU601にCPUリセット用信号を送信し、CPU101をリセットする。   The illegal instruction / invalid instruction detection circuit 655 and the out-of-area access detection circuit 660 each determine whether or not the CPU 601 is operating normally. If it is determined that the CPU 601 is not operating normally, the illegal instruction / invalid instruction detection circuit 655 or the out-of-area access detection circuit 660 transmits a CPU reset signal to the CPU 601 via the CPU reset bus 680. CPU 101 is reset.

ウオッチドッグ回路665、及び、電源監視回路670は、それぞれ、CPU601が正常に動作しているか否かを判定する。CPU601が正常に動作していないと判定された場合、ウオッチドッグ回路665、又は、電源監視回路670は、システムリセット用バス675を介してCPU601や通信回路615などにシステムリセット用信号を送信し、マイクロコンピュータ600全体をリセットする。   The watchdog circuit 665 and the power supply monitoring circuit 670 each determine whether or not the CPU 601 is operating normally. When it is determined that the CPU 601 is not operating normally, the watchdog circuit 665 or the power supply monitoring circuit 670 transmits a system reset signal to the CPU 601, the communication circuit 615, etc. via the system reset bus 675. The entire microcomputer 600 is reset.

クロック発生回路640は、システムのクロック信号を発生させる回路である。タイマカウンタ回路645はCPUリセット信号を発生させる回路である。CPU601は、マイクロコンピュータ600のための制御及び演算を実行する回路である。   The clock generation circuit 640 is a circuit for generating a system clock signal. The timer counter circuit 645 is a circuit that generates a CPU reset signal. The CPU 601 is a circuit that executes control and calculation for the microcomputer 600.

タイマカウンタ回路645は、クロック発生回路640から供給されるクロック信号を予め設定されているカウント上限値に到達するまでカウントする。そして、タイマカウンタ回路645は、カウントした値がカウント上限値に到達したとき、CPUリセット信号を発生させ、CPU601に供給する。その後、タイマカウンタ回路645は、そのカウントした値をクリアし、再度、クロック信号をカウントする。これにより、周期的にCPUリセット信号がCPU601に供給される。したがって、その周期は、クロック発生回路のクロック周波数及びカウント上限値によって決定する。他の実施例において、CPU601は、タイマカウンタ回路645に接続されており、カウント上限値を変更することができる。カウント上限値を変更することにより、周期を変更することができる。   The timer counter circuit 645 counts the clock signal supplied from the clock generation circuit 640 until it reaches a preset count upper limit value. When the counted value reaches the count upper limit value, the timer counter circuit 645 generates a CPU reset signal and supplies it to the CPU 601. Thereafter, the timer counter circuit 645 clears the counted value and counts the clock signal again. Thereby, a CPU reset signal is periodically supplied to the CPU 601. Therefore, the period is determined by the clock frequency of the clock generation circuit and the count upper limit value. In another embodiment, the CPU 601 is connected to the timer counter circuit 645 and can change the count upper limit value. The cycle can be changed by changing the count upper limit value.

他の実施例において、タイマカウンタ回路645は、内部にレジスタを有していてもよい。CPU601は、マイクロコンピュータ600の電源投入時などにカウント上限値をタイマカウンタ回路645に供給し、タイマカウンタ回路645は、カウント上限値をレジスタに保存することができる。   In another embodiment, the timer counter circuit 645 may have a register therein. The CPU 601 supplies the count upper limit value to the timer counter circuit 645 when the microcomputer 600 is turned on, and the timer counter circuit 645 can store the count upper limit value in a register.

図7及び図8は、第1の実施例によるマイクロコンピュータの動作を示したフロー図である。CPU601は、マイクロコンピュータの動作を制御するためのオペレーティングシステム(OS)がRAM605上にロードされた後、そのOSに定義されている指示を実行する。CPU601は、始めに、上記のコンパイラで作成された複数のプログラムモジュールをRAM605上にロードする(ステップ705)。また、それら複数のプログラムモジュールに関連する実行順序情報もRAM605上にロードされる。さらに、他の実施例において、それら複数のプログラムモジュールに関連する推定実行クロック情報がロードされるようにすることもできる。   7 and 8 are flowcharts showing the operation of the microcomputer according to the first embodiment. After an operating system (OS) for controlling the operation of the microcomputer is loaded on the RAM 605, the CPU 601 executes instructions defined in the OS. First, the CPU 601 loads a plurality of program modules created by the above compiler onto the RAM 605 (step 705). Execution order information related to the plurality of program modules is also loaded on the RAM 605. Further, in other embodiments, estimated execution clock information related to the plurality of program modules may be loaded.

CPU601は、実行順序情報に基づいて、最初に実行すべきプログラムモジュールを特定する(ステップ710)。最初に実行すべきプログラムモジュールは、実行順序が「1」であるモジュールを検索すること又はその他の規則などによって特定することができる。   The CPU 601 specifies a program module to be executed first based on the execution order information (step 710). The program module to be executed first can be specified by searching for a module whose execution order is “1” or by other rules.

CPU601は、特定されたプログラムモジュールを実行する(ステップ715)。CPU601は、実行したプログラムモジュールが正常に終了したかを判定する(ステップ720)。この判定は、プログラムモジュールの実行時間が、予めRAM605などに保存されている実行単位時間内であるか否か及び/又は他の規則によって決定される。プログラムモジュールの実行が実行単位時間内に終了しない場合、CPU601にエラーが発生している可能性が高いこと意味する。   The CPU 601 executes the specified program module (step 715). The CPU 601 determines whether the executed program module has ended normally (step 720). This determination is determined by whether or not the execution time of the program module is within the execution unit time previously stored in the RAM 605 and / or other rules. If the execution of the program module does not end within the execution unit time, it means that there is a high possibility that an error has occurred in the CPU 601.

ステップ720において、プログラムモジュールが正常に終了した場合、終了フラグがオンにセットされる(ステップ725)。終了フラグはRAM605などに保存されるようにすることができる。CPU601は、CPUのレジスタの情報をRAM605に保存する(ステップ730)。ステップ720において、プログラムモジュールが正常に終了していなかった場合、終了フラグは、オンにセットされない。   In step 720, if the program module ends normally, an end flag is set on (step 725). The end flag can be stored in the RAM 605 or the like. The CPU 601 stores the CPU register information in the RAM 605 (step 730). In step 720, if the program module has not ended normally, the end flag is not set on.

CPU601はリセット待ちの状態となる(ステップ735)。そして、タイマカウンタ回路645が、CPUリセット信号をCPU601に供給し、CPUはリセットされる(ステップ740)。   The CPU 601 enters a reset waiting state (step 735). Then, the timer counter circuit 645 supplies a CPU reset signal to the CPU 601 and the CPU is reset (step 740).

ステップ710乃至740は、CPU601がリセットされる周期内に完了するようにすることができる。また、ステップ710乃至740は、CPU601がリセットされる周期内に完了しない場合、CPU601がリセットされる前にCPUのレジスタの情報をRAM605に保存し、CPU601は、リセットからの復帰後、RAM605に保存されている情報をCPUのレジスタに保存する必要がある。さらに、CPU601は、ステップ710乃至740の間に、NMI(Non-Maskable Interrupt)などの割込み要求を受け付けることができる。   Steps 710 to 740 may be completed within a period when the CPU 601 is reset. Also, if steps 710 to 740 are not completed within the period in which the CPU 601 is reset, the CPU register information is stored in the RAM 605 before the CPU 601 is reset, and the CPU 601 stores the information in the RAM 605 after returning from reset. It is necessary to store the stored information in the CPU register. Further, the CPU 601 can accept an interrupt request such as NMI (Non-Maskable Interrupt) during steps 710 to 740.

CPU601は、リセットされた後、割込み要求があるか否か判定する(ステップ805)。割込み要求がある場合、CPU601は、割込み要求に関連するプログラムモジュールを実行する(ステップ810)。   After the reset, the CPU 601 determines whether there is an interrupt request (step 805). If there is an interrupt request, the CPU 601 executes the program module associated with the interrupt request (step 810).

終了フラグがオンに設定されているか否かを判定する(ステップ815)。終了フラグがオンである場合、CPU601は、終了フラグをオフに設定する(ステップ820)。今回実行するプログラムモジュールの実行順序を特定するために、前に実行したプログラムモジュールの実行順序をインクリメントする(ステップ825)。実行順序情報(例えば、図4)の実行順序が「1」、「2」、「3」・・・のような数値であり、前に実行したプログラムモジュールの実行順序が「2」である場合、今回実行するプログラムモジュールの実行順序は、「3」となる。他の実施例において、実行順序の値が他の規則によって与えられている場合、その規則に従い、実行すべきプログラムモジュールを特定することができる。   It is determined whether or not the end flag is set to ON (step 815). When the end flag is on, the CPU 601 sets the end flag to off (step 820). In order to specify the execution order of the program modules to be executed this time, the execution order of the previously executed program modules is incremented (step 825). When the execution order of the execution order information (for example, FIG. 4) is a numerical value such as “1”, “2”, “3”, etc., and the execution order of the previously executed program modules is “2” The execution order of the program modules executed this time is “3”. In other embodiments, if execution order values are given by other rules, program modules to be executed can be identified according to the rules.

CPU601は、実行順序に関連するレジスタの情報(ステップ730又は850でRAM605保存された情報)をレジスタに保存する(ステップ830)。CPU601は、実行順序に関連するプログラムモジュールを実行する(ステップ835)。   The CPU 601 stores register information related to the execution order (information stored in the RAM 605 in step 730 or 850) in the register (step 830). The CPU 601 executes a program module related to the execution order (step 835).

ステップ835において、終了フラグがオフであった場合、実行順序がインクリメントされないため、前に実行されたプログラムモジュールが再度、実行される(ステップ835)。終了フラグがオフである場合の例としては、ステップ720において、プログラムモジュールの実行時間が実行単位時間を越えていたと判断された場合、又は、違法命令及び無効命令検出回路655又は領域外アクセス検出回路660が、ステップ720が実行される前に、CPU601が正常に動作していないと判断し、CPUリセット信号をCPU601に供給した場合などである。   In step 835, if the end flag is off, the execution order is not incremented, so the previously executed program module is executed again (step 835). As an example of the case where the end flag is off, when it is determined in step 720 that the execution time of the program module has exceeded the execution unit time, or an illegal instruction and invalid instruction detection circuit 655 or an out-of-region access detection circuit For example, the CPU 660 determines that the CPU 601 is not operating normally before the step 720 is executed, and supplies a CPU reset signal to the CPU 601.

CPU601は、プログラムモジュールが実行された後(ステップ810及び835)、実行したプログラムモジュールが正常に終了したかを判定する(ステップ840)。処理の内容は、図7のステップ720と同じ処理である。   After the program module is executed (steps 810 and 835), the CPU 601 determines whether the executed program module has been completed normally (step 840). The contents of the process are the same as those in step 720 in FIG.

ステップ840において、プログラムモジュールが正常に終了した場合、CPU601は、終了フラグをオンにセットする(ステップ845)。CPU601は、CPUのレジスタの情報をRAM605に保存する(ステップ850)。   If the program module ends normally in step 840, the CPU 601 sets an end flag to ON (step 845). The CPU 601 stores CPU register information in the RAM 605 (step 850).

他の実施例として、ステップ850において、CPU601は、次に実行すべきプログラムモジュールの実行順序を特定し、レジスタの情報と実行順序とを実行順序情報としてRAM605に保存することができる。これにより、複数のプログラムモジュールそれぞれに関連するレジスタの情報をRAM105に保存し、CPU601は、プログラムモジュールに関連するレジスタの情報をより簡単に特定することができる。   As another example, in step 850, the CPU 601 can specify the execution order of the program module to be executed next, and can store the register information and the execution order in the RAM 605 as execution order information. Thereby, the register information related to each of the plurality of program modules is stored in the RAM 105, and the CPU 601 can more easily specify the register information related to the program module.

CPU601はリセット待ちの状態となる(ステップ855)。そして、タイマカウンタ回路645が、CPUリセット信号をCPU601に供給し、CPUはリセットされる(ステップ860)。ステップ860の完了後、処理フローは、ステップ805に戻る。   The CPU 601 enters a reset waiting state (step 855). Then, the timer counter circuit 645 supplies a CPU reset signal to the CPU 601 and the CPU is reset (step 860). After completion of step 860, the process flow returns to step 805.

図9は、CPU601の制御の推移、並びに、そのCPUのレジスタ及びRAM610に保存されている情報の推移を示す第1の実施例についてのタイムチャートである。このタイムチャートは、時刻t1、t2、t3・・・の順に時間が進んでいることを示す。状態905、925、945は、CPU601がリセット信号を受領し、CPU601がリセットされていることを示す。状態910、920、930、940、950、960は、CPU601が、OSに関する処理を実行していることを示す。状態915は、935、955は、CPU601が、プログラムモジュールを実行していることを示す。なお、図9(及び後述する図10)に示す時間の間隔は例示の目的で示しており、実際の動作に必要な時間を示したものではない。   FIG. 9 is a time chart for the first embodiment showing the transition of the control of the CPU 601 and the transition of the information stored in the CPU register and RAM 610. This time chart shows that time advances in the order of time t1, t2, t3. States 905, 925, and 945 indicate that the CPU 601 has received a reset signal and the CPU 601 has been reset. States 910, 920, 930, 940, 950, and 960 indicate that the CPU 601 is executing processing related to the OS. A state 915 indicates that the CPU 601 is executing a program module 935 and 955. Note that the time intervals shown in FIG. 9 (and FIG. 10 to be described later) are shown for illustrative purposes and do not show the time required for actual operation.

時刻t1において、CPU601はリセットされ(図7のステップ740及び図8のステップ860に相当)、CPUのレジスタの情報はリセットされる(状態905)。時刻t1のレジスタの情報「R0」は、レジスタの情報がリセットされていることを示す。時刻t2において、CPU601がOSの処理を実行する(状態910)。これにより、RAM605に保存されていたレジスタの情報「R1」がレジスタにコピー又は保存される(図8のステップ830に相当)。   At time t1, the CPU 601 is reset (corresponding to step 740 in FIG. 7 and step 860 in FIG. 8), and the CPU register information is reset (state 905). The register information “R0” at time t1 indicates that the register information has been reset. At time t2, the CPU 601 executes OS processing (state 910). As a result, the register information “R1” stored in the RAM 605 is copied or stored in the register (corresponding to step 830 in FIG. 8).

時刻t3において、CPU601がプログラムモジュールの処理を実行(状態915)し、レジスタの情報が「R2」に更新される(図7のステップ715及び図8のステップ810及び835に相当)。時刻t4において、CPU601は、レジスタの情報「R2」をRAM605に保存し(図7のステップ730及び図8のステップ850に相当)、プログラムモジュールが正常に終了していた場合、終了フラグをオンにセットする(状態920、図7のステップ725及び図8のステップ845に相当)。   At time t3, the CPU 601 executes processing of the program module (state 915), and the register information is updated to “R2” (corresponding to step 715 in FIG. 7 and steps 810 and 835 in FIG. 8). At time t4, the CPU 601 saves the register information “R2” in the RAM 605 (corresponding to step 730 in FIG. 7 and step 850 in FIG. 8), and turns on the end flag when the program module ends normally. Set (corresponds to state 920, step 725 in FIG. 7 and step 845 in FIG. 8).

時刻t5において、CPU601をリセットすることによって、CPUのレジスタの情報はリセットされ(状態925)、レジスタの情報が「R0」となる。時刻t6乃至t9において実行される処理は、時刻t2乃至t5における処理と同様である。   By resetting the CPU 601 at time t5, the CPU register information is reset (state 925), and the register information becomes “R0”. The processing executed at times t6 to t9 is the same as the processing at times t2 to t5.

時刻t10において、終了フラグがオフであると判定された場合(状態945、図8のステップ815に相当)、前回実行したプログラムモジュール(状態935)を再度実行するために、RAMに保存されているレジスタの情報「R3」ではなく、レジスタの情報「R2」をレジスタに保存する(状態950)。その後、CPU601は、レジスタの情報「R2」を用いて、前回実行したプログラムモジュールを再度実行する(状態955)。   If it is determined at time t10 that the end flag is OFF (state 945, corresponding to step 815 in FIG. 8), the previously executed program module (state 935) is stored in the RAM to be executed again. Instead of register information “R3”, register information “R2” is stored in the register (state 950). Thereafter, the CPU 601 uses the register information “R2” to execute the previously executed program module again (state 955).

プログラムモジュールを再度実行した後、終了フラグが依然オフであると判定された場合、CPU601は、レジスタの情報「R2」の代わりにレジスタの情報「R1」を用いることもできる。これにより、CPU601は、RAM605に保存されている複数の時点のレジスタの情報を用いることによって、それらレジスタの情報のうちの一つに関連するプログラムモジュールを再実行することができる。したがって、マイクロコンピュータ600は、CPU601にエラーが発生していない時点の状態へ復帰することができる。   If it is determined that the end flag is still off after executing the program module again, the CPU 601 can use the register information “R1” instead of the register information “R2”. As a result, the CPU 601 can re-execute the program module related to one of the register information by using the register information at a plurality of points in time stored in the RAM 605. Therefore, the microcomputer 600 can return to the state at the time when no error has occurred in the CPU 601.

図10は、プログラムモジュールの併合前後のCPU601の制御の推移を示す第2の実施例についてのタイムチャートである。   FIG. 10 is a time chart for the second embodiment showing the transition of control of the CPU 601 before and after merging program modules.

プログラムモジュールを実行するための実行時間が、実行単位時間より短い場合、CPU601が動作しない時間が多くなるため、プログラムの実行効率が悪くなる。そこで、本実施例によって、プログラムの実行効率を改善させることができる。   When the execution time for executing the program module is shorter than the execution unit time, the time during which the CPU 601 does not operate increases, and the execution efficiency of the program deteriorates. Therefore, according to the present embodiment, the execution efficiency of the program can be improved.

図10のプログラムモジュール併合前のタイムチャートを参照すると、実行単位時間が時刻t3からt5及び時刻t8からt10であるとき(CPUをリセットする周期はそれぞれ、時刻t1からt6及び時刻t6からt11)に、第1のプログラムモジュールを実行するのに実際に必要な実行時間が時刻t3からt4(状態1015)、その後に実行される第2の実行モジュールの実行時間が時刻t8からt9(状態1040)であることが示されている。   Referring to the time chart before merging program modules in FIG. 10, when the execution unit time is from time t3 to t5 and from time t8 to t10 (the CPU reset period is from time t1 to t6 and from time t6 to t11, respectively). The execution time actually required to execute the first program module is from time t3 to t4 (state 1015), and the execution time of the second execution module executed thereafter is from time t8 to t9 (state 1040). It is shown that there is.

このような場合に、CPU601は、第1及び第2のプログラムモジュールに関連する推定実行クロック数の和を計算し、推定実行クロック数の和と実行単位クロック数とを比較する。推定実行クロック数の和が、実行単位クロック数より小さい場合、CPU601は、第1のプログラムモジュールを実行する前(状態1010)に、第1及び第2のプログラムモジュールを併合し、1つの実行単位時間(時刻t3からt5)の間に第1及び第2のプログラムモジュールを実行する。   In such a case, the CPU 601 calculates the sum of the estimated number of execution clocks related to the first and second program modules, and compares the sum of the estimated number of execution clocks with the number of execution unit clocks. When the sum of the estimated number of execution clocks is smaller than the number of execution unit clocks, the CPU 601 merges the first and second program modules before executing the first program module (state 1010), and executes one execution unit. The first and second program modules are executed during time (time t3 to t5).

図10のプログラムモジュールの併合後のタイムチャートを参照すると、時刻t3からt5の間で、第1及び第2のプログラムモジュールが実行されていることが分かる(状態1015及び1040)。図10のプログラムモジュールの併合前のタイムチャートでは、時刻t13からt14の間で第3のプログラムモジュール(状態1060)は実行されていたが、図10のプログラムモジュールの併合後のタイムチャートでは、時刻t8からt10の間で実行される。第3のプログラムモジュールは、より早い時刻に実行されることから、プログラムの実行効率が改善される。   Referring to the time chart after merging of the program modules in FIG. 10, it can be seen that the first and second program modules are executed between times t3 and t5 (states 1015 and 1040). In the time chart before merging the program modules in FIG. 10, the third program module (state 1060) was executed between times t13 and t14. However, in the time chart after merging the program modules in FIG. It is executed between t8 and t10. Since the third program module is executed at an earlier time, the execution efficiency of the program is improved.

他の実施例において、併合対象のプログラムモジュールのいずれかの処理内容(又は処理回数)及び実行時間が実行時に動的に変化する(図4に示す動的変化フラグがオンである)場合、プログラムモジュールの併合を中止することができる。   In another embodiment, if the processing contents (or the number of processing times) and execution time of any program module to be merged dynamically change during execution (the dynamic change flag shown in FIG. 4 is on), the program You can stop merging modules.

画像や動画などのような大容量のデータを扱うプログラムモジュールにおいて、実行時にプログラムモジュールの実行時間が変動することが考えられる。そして、その実行時間が、実行単位時間を越える可能性も有り得る。このような場合、実行単位時間を越えてプログラムモジュールの実行を継続するために、タイマカウンタ回路645は、CPU601へのCPUリセット信号の供給を停止する。例えば、CPU601は、タイマカウンタ回路645に設定されているカウント上限値を2倍又はそれ以上の値(又はその他の適切な値)に変更することによって、CPUリセット信号の供給を停止することができる。これにより、実際の実行時間が実行単位時間を越えてしまうプログラムモジュールの実行中にCPUのリセットが起こらないようにすることができる。また、本実施例を適用するプログラムモジュールは、図4に示すような動的変化フラグがオンとなっているか否かによって決定することができる。   In a program module that handles a large amount of data such as an image or a moving image, the execution time of the program module may vary during execution. The execution time may exceed the execution unit time. In such a case, the timer counter circuit 645 stops supplying the CPU reset signal to the CPU 601 in order to continue the execution of the program module beyond the execution unit time. For example, the CPU 601 can stop the supply of the CPU reset signal by changing the count upper limit value set in the timer counter circuit 645 to a value that is twice or more (or other appropriate value). . As a result, it is possible to prevent the CPU from being reset during the execution of the program module whose actual execution time exceeds the execution unit time. The program module to which the present embodiment is applied can be determined depending on whether or not the dynamic change flag as shown in FIG. 4 is on.

あるプログラムモジュールの推定実行クロック数に相当する時間(以下、推定実行時間)が、CPU601をリセットする周期(CPU601がリセットされる間隔)よりはるかに短い場合、推定実行クロック数に相当する処理が実行された後、プログラムモジュールの実行に割当てられたクロック数の残り(実行単位クロック数−推定実行クロック数)に相当する時間の間、CPU601は、他のプログラムモジュールを実行することができない。このような場合に、CPU601は、プログラムモジュールを実行するときに、CPUがリセットされる間隔を推定実行時間に近い時間に変更する。これにより、プログラムモジュールの実行後、すぐにCPU601がリセットされ、次のプログラムモジュールを実行することができる。したがって、本実施例によって、プログラムモジュールの実行効率が改善される。   When the time corresponding to the estimated execution clock number of a certain program module (hereinafter referred to as estimated execution time) is much shorter than the cycle of resetting the CPU 601 (interval at which the CPU 601 is reset), processing corresponding to the estimated execution clock number is executed. After that, the CPU 601 cannot execute another program module for a time corresponding to the remaining number of clocks allocated to the execution of the program module (number of execution unit clocks−estimated execution clock number). In such a case, when executing the program module, the CPU 601 changes the interval at which the CPU is reset to a time close to the estimated execution time. Thereby, the CPU 601 is reset immediately after the execution of the program module, and the next program module can be executed. Therefore, according to this embodiment, the execution efficiency of the program module is improved.

CPUがリセットされる間隔を変更する例として、CPU601は、タイマカウンタ回路645に設定されているカウント上限値を変更し、タイマカウンタ回路645がCPUリセット信号を供給する間隔を変更する。また、推定実行時間が、CPU601がリセットされる間隔より長い場合、CPU601は、CPUがリセットされる間隔を推定実行時間に近い時間に変更する。これにより、プログラムモジュールの実行中にCPU601がリセットされることを防止することができる。   As an example of changing the interval at which the CPU is reset, the CPU 601 changes the count upper limit value set in the timer counter circuit 645 and changes the interval at which the timer counter circuit 645 supplies the CPU reset signal. When the estimated execution time is longer than the interval at which the CPU 601 is reset, the CPU 601 changes the interval at which the CPU is reset to a time close to the estimated execution time. This can prevent the CPU 601 from being reset during execution of the program module.

本実施例の説明において、CPU601のリセットは、リセット信号を用いて実行されている。しかしながら、リセット信号の代わりに割込み信号を用いて、CPU601をリセとすることも可能である。また、本実施例において、CPU601のリセットとは、CPU601の内部ロジックを特定の状態にする(例えば、CPUレジスタの全て又は一部を全てクリアするなど)ことを意味する。したがって、本実施例において、CPUのリセット信号は、「内部ロジックを特定の状態にする」ことを意味する「CPUリセット手段」の一例として挙げたに過ぎず、CPUのリセット信号は、考え得る他の手段及び方法などと代替することができる。   In the description of this embodiment, the CPU 601 is reset using a reset signal. However, it is also possible to reset the CPU 601 by using an interrupt signal instead of the reset signal. In this embodiment, resetting the CPU 601 means setting the internal logic of the CPU 601 to a specific state (for example, clearing all or part of the CPU register). Therefore, in the present embodiment, the CPU reset signal is merely given as an example of “CPU reset means” which means “to put the internal logic in a specific state”. These means and methods can be substituted.

上記の実施例において示したマイクロコンピュータ600は、特許請求の範囲に記載した「制御装置」の一例である。制御装置は、マイクロコンピュータとして、ワンチップ上で実装することができるが、必ずしも、ワンチップ上で実装されている必要はない。また、制御装置は、処理部を有する装置として動作する装置(例えば、パーソナルコンピュータや、論理回路と処理部とを組み合わせた装置など)を含でもよい。   The microcomputer 600 shown in the above embodiment is an example of the “control device” described in the claims. The control device can be mounted on a single chip as a microcomputer, but does not necessarily have to be mounted on the single chip. The control device may also include a device that operates as a device having a processing unit (for example, a personal computer or a device that combines a logic circuit and a processing unit).

上記の実施例において示したCPU601は、特許請求の範囲に記載した「処理部」の一例である。処理部は、処理装置又は演算処理装置として動作する装置全てを含む。   The CPU 601 shown in the above embodiment is an example of a “processing unit” described in the claims. The processing unit includes all devices that operate as a processing device or an arithmetic processing device.

上記の実施例において示したRAM605は、特許請求の範囲に記載した「書き換え可能な記憶装置」の一例である。書き換え可能な記憶装置は、不揮発性メモリなどの記憶装置であって、書き換えが行える記憶装置全てを含む。特に、書き換え可能な記憶装置は、主記憶装置として用いることが可能な記憶装置である。   The RAM 605 shown in the above embodiment is an example of a “rewritable storage device” described in the claims. The rewritable storage devices include all storage devices that are rewritable storage devices such as a nonvolatile memory. In particular, the rewritable storage device is a storage device that can be used as a main storage device.

上記の実施例において示したオペレーティングシステム(OS)は、特許請求の範囲に記載した「制御ソフトウェア」の一例である。制御ソフトウェアは、制御装置(又はマイクロコンピュータ)の動作を制御するためソフトウェアである。   The operating system (OS) shown in the above embodiment is an example of “control software” described in the claims. The control software is software for controlling the operation of the control device (or microcomputer).

上記の実施例において、ハードウエアで実現するよう説明されたいくつかの要素の一部又は全ては、ソフトウェアで実現することができ、そして、ソフトウェアで実現するよう説明されたいくつかの要素の一部又は全ては、ハードウエアで実現することができることは理解されるであろう。   In the above embodiment, some or all of some elements described to be realized by hardware can be realized by software, and one of some elements described to be realized by software is one of them. It will be understood that some or all can be implemented in hardware.

以上に説明した処理又は動作フローにおいて、あるステップにおいて、そのステップではまだ利用することができないはずのデータを利用しているなどの処理又は動作フロー上の矛盾が生じない限りにおいて、処理又は動作フローを自由に変更することができる。   In the process or operation flow described above, unless there is a contradiction in the process or operation flow, such as using data that should not be used in that step, the process or operation flow described above. Can be changed freely.

以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。   Each Example described above is an illustration for explaining the present invention, and the present invention is not limited to these Examples. The present invention can be implemented in various forms without departing from the gist thereof.

500 コンピュータ端末
505 コンピュータ端末用CPU
510 コンピュータ端末用入力装置
515 コンピュータ端末用表示装置
545 コンピュータ端末用入出力インタフェース
525 コンピュータ端末用RAM
530 コンピュータ端末用ROM
535 コンピュータ端末用ハードディスク
540 コンピュータ端末用リムーバブルディスク
550 記憶装置
600 マイクロコンピュータ
601 中央処理装置(CPU)
605 主記憶装置(RAM)
610 ROM
615 通信用回路
620 ユニバーサルカウンタタイマ
625 入出力ポート
630 論理和回路(OR回路)
635 システムリセット入力
637 CPUリセット入力
640 クロック発生回路
645 タイマカウンタ回路
655 違法命令及び無効命令検出回路
660 領域外アクセス検出回路
655 ウオッチドッグ回路
670 電源監視回路
500 Computer terminal 505 Computer terminal CPU
510 Computer Terminal Input Device 515 Computer Terminal Display Device 545 Computer Terminal Input / Output Interface 525 Computer Terminal RAM
530 ROM for computer terminals
535 Hard disk for computer terminal 540 Removable disk for computer terminal 550 Storage device 600 Microcomputer 601 Central processing unit (CPU)
605 Main memory (RAM)
610 ROM
615 Communication circuit 620 Universal counter timer 625 I / O port 630 OR circuit (OR circuit)
635 System reset input 637 CPU reset input 640 Clock generation circuit 645 Timer counter circuit 655 Illegal instruction and invalid instruction detection circuit 660 Out-of-region access detection circuit 655 Watchdog circuit 670 Power supply monitoring circuit

Claims (23)

処理部と、
前記処理部とバスを介して接続されている書き換え可能な記憶装置であって、一又は二以上のソースコードをコンパイルしたマシン語を分割することによって作成される複数のプログラムモジュール、当該複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報、及び、制御ソフトウェアを動作時にロードする書き換え可能な記憶装置と、
前記処理部をリセットする処理部リセット手段と、
を備え、
前記制御ソフトウェアは、前記処理部に、
前記複数のプログラムモジュールにおける第1のプログラムモジュールを実行するステップと、
前記処理部のレジスタの情報を前記書き換え可能な記憶装置に保存するステップと、
を実行させるためのソフトウェアであって、
前記制御ソフトウェアは、前記処理部リセット手段が前記処理部をリセットした後、さらに、前記処理部に、
前記書き換え可能な記憶装置に保存されている前記レジスタの情報を前記処理部のレジスタに保存するステップと、
前記第1のプログラムモジュールの次に実行すべきと前記実行順序情報に定義されている第2のプログラムモジュールを実行するステップと、
を実行させるためのソフトウェアであることを特徴とする制御装置。
A processing unit;
A rewritable storage device connected to the processing unit via a bus, a plurality of program modules created by dividing a machine language obtained by compiling one or more source codes, and the plurality of programs Execution order information that defines the execution order of each module, and a rewritable storage device that loads the control software during operation;
Processing unit resetting means for resetting the processing unit;
With
The control software is in the processing unit,
Executing a first program module in the plurality of program modules;
Storing the register information of the processing unit in the rewritable storage device;
Software for executing
After the processing unit reset means resets the processing unit, the control software further includes the processing unit,
Storing the register information stored in the rewritable storage device in the register of the processing unit;
Executing the second program module defined in the execution order information to be executed next to the first program module;
A control device characterized in that the control device is software for executing the control.
前記処理部リセット手段は、前記処理部が前記複数のプログラムモジュールの1つを実行するために費やすことができる時間である実行単位時間より長い時間である所定の周期で前記処理部をリセットすることを特徴とする請求項1に記載の制御装置。   The processing unit resetting unit resets the processing unit at a predetermined cycle that is longer than an execution unit time that is a time that the processing unit can spend to execute one of the plurality of program modules. The control device according to claim 1. 前記制御ソフトウェアは、前記処理部に、
前記第1のプログラムモジュールの実行が前記実行単位時間内に終了しない場合、前記処理部リセット手段による前記処理部のリセットを停止するステップを実行させるためのソフトウェアであることを特徴とする請求項2に記載の制御装置。
The control software is in the processing unit,
3. The software for executing a step of stopping resetting of the processing unit by the processing unit resetting unit when execution of the first program module does not end within the execution unit time. The control device described in 1.
前記制御ソフトウェアは、前記第2のプログラムモジュールが実行され、前記処理部リセット手段によって前記処理部がリセットされた後、前記処理部に、
前記第2のプログラムモジュールが正常に終了したか否かを判定するステップと、
前記第2のプログラムモジュールが正常に終了しなかった場合、前記書き換え可能な記憶装置に保存されている前記レジスタの情報を前記処理部のレジスタに保存するステップと、
前記第2のプログラムモジュールを再度実行するステップと、
を実行させるためのソフトウェアであることを特徴とする請求項1乃至3のいずれか一つに記載の制御装置。
The control software executes the second program module and resets the processing unit by the processing unit resetting unit.
Determining whether the second program module has terminated normally;
If the second program module does not end normally, storing the register information stored in the rewritable storage device in the register of the processing unit;
Re-executing the second program module;
The control device according to claim 1, wherein the control device is software for executing the control.
前記書き換え可能な記憶装置は、さらに、
前記複数のプログラムモジュールそれぞれを実行する際に必要となるクロック数の推定値である推定実行クロック数を定義する推定実行クロック情報を動作時にロードし、
前記制御ソフトウェアは、前記処理部に、
前記第1のプログラムモジュールの推定実行クロック数と前記第2のプログラムモジュールの推定実行クロック数とを加えた値である加算クロック数と、前記実行単位クロック数とを比較するステップと、
前記加算クロック数が前記実行単位クロック数より小さい場合、前記第1のプログラムモジュールの終了後、前記処理部をリセットすることなく、前記第2のプログラムモジュールを実行するステップと、
を実行させるためのソフトウェアであることを特徴とする請求項1乃至4のいずれか一つに記載の制御装置。
The rewritable storage device further includes:
Loading estimated execution clock information that defines the estimated number of execution clocks, which is an estimated value of the number of clocks required when executing each of the plurality of program modules, during operation;
The control software is in the processing unit,
Comparing an added clock number that is a value obtained by adding the estimated execution clock number of the first program module and the estimated execution clock number of the second program module with the execution unit clock number;
When the added clock number is smaller than the execution unit clock number, the second program module is executed without resetting the processing unit after completion of the first program module;
The control device according to claim 1, wherein the control device is software for executing the control.
前記制御ソフトウェアは、前記処理部に、
前記処理部がリセットされる時間の間隔を変更するステップを実行させるためのソフトウェアであることを特徴とする請求項1乃至5のいずれか一つに記載の制御装置。
The control software is in the processing unit,
6. The control device according to claim 1, wherein the control device is software for executing a step of changing a time interval at which the processing unit is reset.
前記マシン語は、前記マシン語における1又は2以上の命令グループに基づいて、分割されていることを特徴とする請求項1乃至6のいずれか一つに記載の制御装置。   The control device according to claim 1, wherein the machine language is divided based on one or more instruction groups in the machine language. 前記マシン語は、前記実行単位時間及び前記処理部のクロック周波数から計算される実行単位クロック数に基づいて、分割されていることを特徴とする請求項1乃至6のいずれか一つに記載の制御装置。   7. The machine language according to claim 1, wherein the machine language is divided based on the number of execution unit clocks calculated from the execution unit time and the clock frequency of the processing unit. Control device. 前記マシン語は、前記実行単位時間及び前記処理部のクロック周波数から計算される実行単位クロック数と前記マシン語における1又は2以上の命令グループとに基づいて、分割されていることを特徴とする請求項1乃至6のいずれか一つに記載の制御装置。   The machine language is divided based on the number of execution unit clocks calculated from the execution unit time and the clock frequency of the processing unit and one or more instruction groups in the machine language. The control apparatus as described in any one of Claims 1 thru | or 6. 前記制御装置は、マイクロコンピュータであることを特徴とする請求項1乃至9のいずれか一つに記載の制御装置。   The control device according to claim 1, wherein the control device is a microcomputer. 前記マイクロコンピュータは、ワンチップ上で実装されることを特徴とする請求項10に記載の制御装置。   The control apparatus according to claim 10, wherein the microcomputer is mounted on one chip. 前記処理部は、中央処理装置(CPU)であることを特徴とする請求項1乃至11のいずれか一つに記載の制御装置。   The control device according to claim 1, wherein the processing unit is a central processing unit (CPU). 前記書き換え可能な記憶装置は、RAMであることを特徴とする請求項1乃至12のいずれか一つに記載の制御装置。   The control device according to claim 1, wherein the rewritable storage device is a RAM. 前記制御ソフトウェアは、オペレーティングシステム(OS)であることを特徴とする請求項1乃至13のいずれか一つに記載の制御装置。   The control device according to claim 1, wherein the control software is an operating system (OS). 前記書き換え可能な記憶装置は、複数の時点における前記処理部のレジスタの情報を保存することを特徴とする請求項1乃至14のいずれか一つに記載の制御装置。   15. The control device according to claim 1, wherein the rewritable storage device stores register information of the processing unit at a plurality of points in time. 一又は二以上のソースコードをマシン語にコンパイルするステップと、
前記マシン語を実行するために必要なクロック数を計算するステップと、
前記マシン語における1又は2以上の命令グループを単位として前記マシン語を分割し、さらに、前記必要なクロック数が前記マシン語の1つのグループを実行するために費やすことができる時間である実行単位時間に基づく実行単位クロック数より小さい又は等しくなるよう前記マシン語を分割し、複数のプログラムモジュールを作成するステップと、
前記複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、
を含むことを特徴とするコンピュータプログラムのコンパイル方法。
Compiling one or more source codes into machine language;
Calculating the number of clocks required to execute the machine language;
An execution unit in which the machine language is divided in units of one or more instruction groups in the machine language, and the required number of clocks is a time that can be spent to execute one group of the machine language Dividing the machine language to be less than or equal to the number of execution unit clocks based on time, and creating a plurality of program modules;
Creating execution order information that defines the execution order of each of the plurality of program modules;
A computer program compiling method comprising:
前記マシン語を実行するコンピュータが有する処理部のクロック周波数と前記実行単位時間とに基づいて、前記実行単位クロック数を計算するステップをさらに含むことを特徴とする請求項16に記載のコンパイル方法。   The compiling method according to claim 16, further comprising a step of calculating the number of execution unit clocks based on a clock frequency of a processing unit included in a computer executing the machine language and the execution unit time. 前記複数のプログラムモジュールそれぞれを実行する際に必要となるクロック数を推定し、各推定実行クロック数を定義する推定実行クロック情報を作成するステップをさらに有することを特徴とする請求項16及び17のいずれか一つに記載のコンパイル方法。   18. The method according to claim 16, further comprising a step of estimating the number of clocks required for executing each of the plurality of program modules and creating estimated execution clock information defining each estimated execution clock number. The compiling method according to any one of the above. 連続して実行される2以上のプログラムモジュールの推定実行クロック数の合計が、前記実行単位クロック数より小さい場合、当該2以上のプログラムモジュールを併合するステップをさらに有することを特徴とする請求項18に記載のコンパイル方法。   19. The method according to claim 18, further comprising the step of merging the two or more program modules when the sum of the estimated execution clock numbers of the two or more program modules executed in succession is smaller than the execution unit clock number. Compile method described in 1. 一又は二以上のソースコードをマシン語にコンパイルするステップと、
前記マシン語を実行するために必要なクロック数を計算するステップと、
前記必要なクロック数が前記マシン語の1つのグループを実行するために費やすことができる時間である実行単位時間に基づく実行単位クロック数より小さい又は等しくなるよう前記マシン語を分割し、複数のプログラムモジュールを作成するステップと、
前記複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、
を含むことを特徴とするコンピュータプログラムのコンパイル方法。
Compiling one or more source codes into machine language;
Calculating the number of clocks required to execute the machine language;
A plurality of programs that divide the machine language so that the required number of clocks is less than or equal to the number of execution unit clocks based on the execution unit time, which is the time that can be spent to execute one group of the machine language Creating a module;
Creating execution order information that defines the execution order of each of the plurality of program modules;
A computer program compiling method comprising:
前記マシン語を実行するコンピュータが有する処理部のクロック周波数と前記実行単位時間とに基づいて、実行単位クロック数を計算するステップをさらに含むことを特徴とする請求項20に記載のコンパイル方法。   21. The compiling method according to claim 20, further comprising a step of calculating the number of execution unit clocks based on a clock frequency of a processing unit included in a computer executing the machine language and the execution unit time. 一又は二以上のソースコードをマシン語にコンパイルするステップと、
前記マシン語における1又は2以上の命令グループを単位として、前記マシン語を分割し、複数のプログラムモジュールを作成するステップと、
前記複数のプログラムモジュールそれぞれの実行順序を定義する実行順序情報を作成するステップと、
を含むことを特徴とするコンピュータプログラムのコンパイル方法。
Compiling one or more source codes into machine language;
Dividing the machine language into units of one or more instruction groups in the machine language and creating a plurality of program modules;
Creating execution order information that defines the execution order of each of the plurality of program modules;
A computer program compiling method comprising:
請求項16乃至22のいずれか一つに記載のコンピュータプログラムのコンパイル方法を用いたコンパイラ。   A compiler using the computer program compiling method according to any one of claims 16 to 22.
JP2011255276A 2011-11-22 2011-11-22 Compiler, control method of program module generated by compiler, and control device which achieves control method Pending JP2013109652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011255276A JP2013109652A (en) 2011-11-22 2011-11-22 Compiler, control method of program module generated by compiler, and control device which achieves control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011255276A JP2013109652A (en) 2011-11-22 2011-11-22 Compiler, control method of program module generated by compiler, and control device which achieves control method

Publications (1)

Publication Number Publication Date
JP2013109652A true JP2013109652A (en) 2013-06-06

Family

ID=48706329

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011255276A Pending JP2013109652A (en) 2011-11-22 2011-11-22 Compiler, control method of program module generated by compiler, and control device which achieves control method

Country Status (1)

Country Link
JP (1) JP2013109652A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015011476A (en) * 2013-06-27 2015-01-19 富士電機株式会社 Software development support device, software development support method and software development support program
JP2015534191A (en) * 2012-10-04 2015-11-26 クアルコム,インコーポレイテッド Method for proactively restarting software and increasing mean time between failures in a multi-subsystem mobile communication device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05298135A (en) * 1992-04-20 1993-11-12 Nec Aerospace Syst Ltd Processing system for cpu
JPH0671024A (en) * 1993-08-06 1994-03-15 Daiichi Shokai Co Ltd Pachinko game machine controller
JPH06230988A (en) * 1993-02-04 1994-08-19 Mitsubishi Electric Corp Computer
JPH07114472A (en) * 1993-10-18 1995-05-02 Fujitsu Ltd Object-oriented data processing system
US20050166202A1 (en) * 2002-02-08 2005-07-28 Peter Gerell Method and system for determining total code execution time in a data processor
JP2010271810A (en) * 2009-05-20 2010-12-02 Panasonic Corp Information processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05298135A (en) * 1992-04-20 1993-11-12 Nec Aerospace Syst Ltd Processing system for cpu
JPH06230988A (en) * 1993-02-04 1994-08-19 Mitsubishi Electric Corp Computer
JPH0671024A (en) * 1993-08-06 1994-03-15 Daiichi Shokai Co Ltd Pachinko game machine controller
JPH07114472A (en) * 1993-10-18 1995-05-02 Fujitsu Ltd Object-oriented data processing system
US20050166202A1 (en) * 2002-02-08 2005-07-28 Peter Gerell Method and system for determining total code execution time in a data processor
JP2010271810A (en) * 2009-05-20 2010-12-02 Panasonic Corp Information processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015534191A (en) * 2012-10-04 2015-11-26 クアルコム,インコーポレイテッド Method for proactively restarting software and increasing mean time between failures in a multi-subsystem mobile communication device
JP2015011476A (en) * 2013-06-27 2015-01-19 富士電機株式会社 Software development support device, software development support method and software development support program

Similar Documents

Publication Publication Date Title
KR101903805B1 (en) Method for checkpointing and restoring program state
US6708326B1 (en) Method, system and program product comprising breakpoint handling mechanism for debugging and/or monitoring a computer instruction sequence
EP2165258B1 (en) Apparatus and method for handling exception signals in a computing system
KR102028663B1 (en) Apparatus and method for error detection
TWI428764B (en) Optimizing execution of single-threaded programs on a multiprocessor managed by compilation
CN109933451B (en) RISC-V architecture based exception and interrupt handling system and method
KR20110070468A (en) Apparatus for executing instrumentation and method thereof
CN107526622B (en) Rapid exception handling method and device for Linux
WO2019013876A1 (en) Replaying time-travel traces relying on processor undefined behavior
US10496433B2 (en) Modification of context saving functions
CN111819551A (en) Tracing branch instructions
RU2432601C2 (en) Method of introducing determinism among multiple clock intervals
JP2013109652A (en) Compiler, control method of program module generated by compiler, and control device which achieves control method
US10761512B2 (en) Numerical controller
JPH11175369A (en) Program development supporting device, program development supporting method and medium recording program development supporting program
KR101743836B1 (en) debugging method of programmable logic controller which uses general purpose microprocessor
CN109947550B (en) Non-shielding interrupt processing system and method suitable for RISC-V architecture
JP2005215816A (en) Performance profiling method using hardware monitor
Huang et al. Investigating time properties of interrupt-driven programs
US10365906B2 (en) Compile time interface to run-time libraries
KR101785540B1 (en) Emulation method and apparatus for processing request for non-deterministic hardware interrupt
US20130173682A1 (en) Floating-point error propagation in dataflow
CN111078449A (en) Information processing method, information processing device and terminal equipment
CN106021041B (en) Multi-cycle non-pipeline CPU debugging method based on finite state machine
JP2018128767A (en) Debug system and semiconductor device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150717

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150812

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20151221