JP3361949B2 - Program verification device - Google Patents

Program verification device

Info

Publication number
JP3361949B2
JP3361949B2 JP03634397A JP3634397A JP3361949B2 JP 3361949 B2 JP3361949 B2 JP 3361949B2 JP 03634397 A JP03634397 A JP 03634397A JP 3634397 A JP3634397 A JP 3634397A JP 3361949 B2 JP3361949 B2 JP 3361949B2
Authority
JP
Japan
Prior art keywords
interrupt
time
execution
task
measurement
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.)
Expired - Fee Related
Application number
JP03634397A
Other languages
Japanese (ja)
Other versions
JPH10232794A (en
Inventor
貴 三浦
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP03634397A priority Critical patent/JP3361949B2/en
Publication of JPH10232794A publication Critical patent/JPH10232794A/en
Application granted granted Critical
Publication of JP3361949B2 publication Critical patent/JP3361949B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、リアルタイム・
マルチタスクプログラムの終了時刻と要求実行時間とを
比較検証するプログラム検証に関するものである。
This invention relates to real-time
The present invention relates to program verification for comparing and verifying the end time of a multitask program and the required execution time.

【0002】[0002]

【従来の技術】自動車やミサイル等の開発シミュレーシ
ョンでは、高精度なシミュレーション結果が要求れさる
ため、スペックタイムすなわち時間的制約条件が与えら
れているリアルタイム・マルチタスクプログラムが実行
される。
2. Description of the Related Art In a development simulation of an automobile, a missile or the like, since a highly accurate simulation result is required, a real-time multitask program given a spec time, that is, a time constraint condition is executed.

【0003】リアルタイム・マルチタスクプログラム
は、複数のタスクがあたかも同時に動作しているように
プログラムを実行していくマルチタスクプログラムに対
し、時間的制約条件が加わったものである。実際にはオ
ペレーティングシステムが、複数のタスクをディスパッ
チすることにより実行されている。
The real-time multi-task program is a multi-task program which executes programs as if a plurality of tasks were operating at the same time, with a time constraint condition added thereto. In reality, the operating system is executed by dispatching multiple tasks.

【0004】このリアルタイム・マルチタスクプログラ
ムでは、複数のタスクの実行中に割り込み処理タスクが
実行されることがあり、割り込み処理タスクの発生時間
によっては時間的制約条件が満たされない場合が生じ
る。本来の従来技術を説明する前に、これについて図2
〜5のタイミング図を用いて多少詳しく説明する。なお
ここでは技術的な問題点を単純化するために、単一プロ
セッサで動作するプログラムについて述べる。
In this real-time multi-task program, an interrupt processing task may be executed during execution of a plurality of tasks, and the time constraint condition may not be satisfied depending on the generation time of the interrupt processing task. Before describing the original prior art, FIG.
This will be described in more detail with reference to the timing charts of FIG. Here, in order to simplify the technical problems, a program that runs on a single processor will be described.

【0005】図2において、プログラムが実行されるも
のとして、3つのタスク1〜3、割り込み処理タスク、
ディスク装置等のシステムリソース、及びオペレーティ
ングシステムのディスパッチャがある。タスク1の終了
時刻に対して、時刻20の時間的制約条件が与えられて
いる。また、タスク1は時刻0から時刻4までの間に割
り込み許可をしている。
In FIG. 2, as a program to be executed, three tasks 1 to 3, an interrupt processing task,
There are system resources such as disk devices, and an operating system dispatcher. A time constraint condition of time 20 is given to the end time of task 1. Further, task 1 permits interrupts from time 0 to time 4.

【0006】それぞれのタスク1〜3には優先度があ
り、ここではタスク1>タスク2>タスク3の優先度に
従って、ディスパッチャによりタスクが切り替わってい
る。ディスパッチャによるタスクの切り替えにはいくら
かの時間的なペナルティ、ここでは時刻1が必要であ
る。
Each of the tasks 1 to 3 has a priority, and here, the tasks are switched by the dispatcher according to the priority of task 1> task 2> task 3. Switching the tasks by the dispatcher requires some time penalty, here time 1.

【0007】タスク2は、時刻5でシステムリソースを
要求し占有しており、タスク2によるシステムリソース
の占有が解放されるまで、ここでは時刻3の後までは、
他のタスクがシステムリソースを要求しようとすると、
オペレーティングシステムはそのタスクの実行を延期す
る。
Task 2 requests and occupies the system resource at time 5, and until task 2 releases the occupation of the system resource, here, after time 3,
When other tasks try to demand system resources,
The operating system suspends the execution of that task.

【0008】図2の例では、割り込み処理タスクが実行
されておらず、タスク1の終了が時刻16であり、時間
的制約条件を満たしている。
In the example of FIG. 2, the interrupt processing task is not executed, task 1 ends at time 16, and the time constraint condition is satisfied.

【0009】図3では、時刻2に割り込み要求が発生
し、タスク1から割り込み処理タスクに制御が移る様子
が示されている。割り込み処理タスクの終了後、再び優
先度の高いタスク1に制御が移っている。
FIG. 3 shows that an interrupt request is generated at time 2 and control is transferred from task 1 to the interrupt processing task. After the completion of the interrupt processing task, the control is transferred to the task 1 having a higher priority again.

【0010】ここで、割り込み処理タスクがタスク2と
同じシステムリソースを要求しているとしても、割り込
み処理タスクとタスク2によるシステムリソースの競合
は起きていない。この結果、タスク1の終了時刻は時刻
20であり、時間的制約条件を満たしている。
Here, even if the interrupt processing task requests the same system resource as the task 2, there is no conflict between the interrupt processing task and the task 2 in the system resource. As a result, the end time of task 1 is time 20, which satisfies the time constraint condition.

【0011】ところが、図4のように、割り込み要求の
発生時刻が少しずれると、時間的制約条件が満たせなく
なる。図4において、割り込み要求が時刻3で発生する
と、割り込み処理タスクによシステムリソースの占有
は、時刻3の後すなわち時刻9に解放される。
However, as shown in FIG. 4, if the generation time of the interrupt request is slightly shifted, the time constraint condition cannot be satisfied. In FIG. 4, when an interrupt request occurs at time 3, the occupation of system resources by the interrupt processing task is released after time 3, that is, at time 9.

【0012】この場合、本来ディスパッチャにより起動
されるタスク2はオペレーティングシステムにより延期
され、タスク3にディスパッチされてしまう。割り込み
処理タスクによるシステムリソースの占有が解放される
と、オペレーティングシステムは、本来タスク優先度が
高いタスク2の延期を解除するために、ディスパッチャ
によるタスク3からタスク2へのディスパッチが発生す
る。この余計なディスパッチのために、タスク1の終了
時刻は時刻21になり時間的制約条件が満たせなくな
る。
In this case, task 2 originally started by the dispatcher is postponed by the operating system and dispatched to task 3. When the occupation of the system resource by the interrupt processing task is released, the operating system causes the dispatcher to dispatch the task 3 to the task 2 in order to cancel the suspension of the task 2, which originally has a high task priority. Due to this extra dispatch, the end time of task 1 becomes time 21, and the time constraint condition cannot be satisfied.

【0013】さらに割り込み要求の発生時刻がずれる
と、図5のように、再び時間的制約条件を満たすように
なる。図5では、割り込み要求が時刻4で発生してお
り、この結果タスク1の終了時刻は時刻19となってい
る。これは、割り込み処理タスクによるシステムリソー
スの解放が遅れるため(時刻10で解放)、タスク3か
らタスク2への余計なディスパッチが発生しないからで
ある。
Further, if the generation time of the interrupt request is deviated, the time constraint condition is satisfied again as shown in FIG. In FIG. 5, the interrupt request is generated at time 4, and as a result, the end time of task 1 is time 19. This is because the release of system resources by the interrupt processing task is delayed (released at time 10), so that extra dispatch from task 3 to task 2 does not occur.

【0014】このようにリアルタイム・マルチタスクプ
ログラムでは、割り込み処理タスク発生時間のわずかな
差により時間的制約条件を満たせないような状況がおこ
り得る。このため従来より、様々な時間で割り込みを発
生させ、リアルタイム・マルチタスクプログラムを検証
している。
As described above, in the real-time multi-task program, a situation in which the time constraint condition cannot be satisfied may occur due to a slight difference in the interrupt processing task generation time. Therefore, conventionally, interrupts are generated at various times to verify real-time multitask programs.

【0015】従来の検証技術を、図6を用いて説明す
る。図6において、外部メモリ31は、オペレーティン
グシステム、検証の対象となる複数のタスク、及び割り
込み検証プログラムを格納し、アドレスバス33を介し
てバス35と接続されている。
A conventional verification technique will be described with reference to FIG. In FIG. 6, an external memory 31 stores an operating system, a plurality of tasks to be verified, and an interrupt verification program, and is connected to a bus 35 via an address bus 33.

【0016】命令実行装置37は、プログラム実行期間
中、単位時間毎にクロック信号CLKをプログラマブル
タイマ39に出力し、プログラマブルタイマ39から出
力される割り込み信号IRSがアクティブになると、ア
ドレスバス33とバス35を介してオペレーティングシ
ステムから指示され、割り込み処理タスクを実行する。
The instruction execution unit 37 outputs the clock signal CLK to the programmable timer 39 every unit time during the program execution period, and when the interrupt signal IRS output from the programmable timer 39 becomes active, the address bus 33 and the bus 35. It is instructed by the operating system via the to execute the interrupt processing task.

【0017】プログラマブルタイマ39は、カウンタ4
1、割り込み発生カウント値保持部43、及び割り込み
発生部45を備えている。カウンタ41は、クロック信
号CLKに基づいてその値をカウントアップし、実行時
間を計測する。割り込み発生カウント値保持部43は、
割り込み検証プログラムからデータバス47を介して設
定される割り込み発生カウント値を保持する。割り込み
発生部45は、カウンタ41の計測時間TIMEと割り
込み発生カウント値保持部43のカウント値を比較し、
値が一致すると、割り込み信号IRSをアクティブにす
る。これにより、命令実行装置37に割り込み要求を行
なう。
The programmable timer 39 is a counter 4
1, an interrupt generation count value holding unit 43, and an interrupt generation unit 45. The counter 41 counts up the value based on the clock signal CLK and measures the execution time. The interrupt generation count value holding unit 43
The interrupt generation program holds the interrupt generation count value set via the data bus 47. The interrupt generation unit 45 compares the measured time TIME of the counter 41 with the count value of the interrupt generation count value holding unit 43,
When the values match, the interrupt signal IRS is activated. As a result, an interrupt request is issued to the instruction execution unit 37.

【0018】このような従来の検証技術で、時間的制約
条件の対象となるタスクの割り込み検証を行う方法の例
を2つ示す。ただし対象となるタスクの動作する時間の
うち、割り込み許可の時間範囲は限定されているものと
する。
Two examples of a method of performing the interrupt verification of the task subject to the time constraint condition by such a conventional verification technique will be shown. However, it is assumed that the time range in which the interrupt is permitted is limited in the operation time of the target task.

【0019】第1の方法は、時間的制約条件の対象とな
るタスクと全く独立に割り込み検証プログラムを動作さ
せる方法である。割り込み検証プログラムは、割り込み
発生カウント値を保持部43に設定し、命令実行装置3
7に割り込み要求の発生時刻を設定する。この割り込み
要求発生時刻は、時間的制約条件の対象となるタスクに
対して検証もれがないように設定する必要がある。
The first method is to operate the interrupt verification program completely independently of the task subject to the time constraint condition. The interrupt verification program sets the interrupt generation count value in the holding unit 43, and the instruction execution unit 3
The interrupt request generation time is set in 7. This interrupt request generation time must be set so that there is no omission of verification for the task subject to the time constraint condition.

【0020】この際、割り込み発生カウント値として乱
数が設定される場合がある。この乱数は、割り込み検証
プログラムで設定せず、プログラマブルタイマ39自身
が発生して設定しても構わない。
At this time, a random number may be set as the interrupt generation count value. The random number may be generated and set by the programmable timer 39 itself without being set by the interrupt verification program.

【0021】第2の方法は、時間的制約条件の対象とな
るタスクがディスパッチされる前に、必ず割り込み検証
プログラムが起動されるようにオペレーティングシステ
ムに登録しておく方法である。この方法では、割り込み
検証プログラムが、命令実行装置37に割り込み要求を
行なう時刻を割り込み発生カウント値として設定する。
この時刻は、割り込み検証プログラムの起動終了後、対
象となるタスクがディスパッチされた直後からの割り込
み要求を行いたい時刻である。
The second method is a method of registering in the operating system so that the interrupt verification program is always started before the task subject to the time constraint condition is dispatched. In this method, the interrupt verification program sets the time at which an interrupt request is issued to the instruction execution unit 37 as the interrupt generation count value.
This time is the time when it is desired to issue an interrupt request immediately after the target task is dispatched after the start of the interrupt verification program.

【0022】[0022]

【発明が解決しようとする課題】以上のように、従来の
検証方法には、2つの方法があったがそれぞれ問題点が
あった。第1の方法の問題点は、時間的制約条件の対象
となるタスク全体に対して、割り込み要求の発生時刻を
一様な乱数で発生させるため、対象となるタスクにおけ
る割り込み許可の範囲以外で割り込み要求が発行される
場合があるということである。
As described above, the conventional verification method has two methods, but each has a problem. The problem with the first method is that since the interrupt request generation time is generated with a uniform random number for the entire task subject to the time constraint condition, an interrupt is issued outside the interrupt enable range of the target task. The request may be issued.

【0023】この場合、タスクでは割り込み要求は無視
されるので結果としてなにも起こらないことになるが、
割り込み許可の範囲がタスクの実行時間に対して短い場
合、割り込み検証の起こる確率が低くなり、効率が悪く
なる。結果的には多大な検証時間が必要となる。
In this case, the task ignores the interrupt request, and as a result nothing happens.
If the range of interrupt permission is short with respect to the task execution time, the probability of occurrence of interrupt verification is low and the efficiency is low. As a result, a great deal of verification time is required.

【0024】第2の方法では、割り込み要求の発生時刻
を割り込み許可の範囲内に限定することができるため、
第1の方法のような問題は起こらず、検証時間を節約す
ることができる。
In the second method, the time at which the interrupt request is generated can be limited within the range of interrupt permission.
The problem like the first method does not occur, and the verification time can be saved.

【0025】しかしながら、第2の方法では、割り込み
検証プログラムそのものの存在が問題になる。割り込み
検証プログラムは、本来のアプリケーションプログラム
にはないプログラムであるが、割り込み発生カウント値
を設定する際に命令実行装置のCPU時間を消費してし
まう。従って第2の方法で検証しながらアプリケーショ
ンプログラムを実行した場合と、アプリケーションプロ
グラムが命令実行装置37のCPU時間を100%消費
して実行した場合とでは、対象となるタスクの終了時刻
が異なってくる。
However, in the second method, the existence of the interrupt verification program itself poses a problem. The interrupt verification program is a program that is not included in the original application program, but consumes the CPU time of the instruction execution device when setting the interrupt generation count value. Therefore, the end time of the target task is different between when the application program is executed while verifying by the second method and when the application program consumes 100% of the CPU time of the instruction execution unit 37 and executes it. .

【0026】また、第1の方法と第2の方法の共通の問
題点として、対象となるタスクの実行時間が時間的制約
条件を満たすか否かを判断する機能が必要である。この
機能をタスク自身に持たせる場合と、割り込み検証プロ
グラムに持たせる場合などが考えられるが、いずれも命
令実行装置37のCPU時間を消費し、前述した問題点
と同じ問題が起こる。
Further, as a common problem between the first method and the second method, it is necessary to have a function of judging whether or not the execution time of the target task satisfies the time constraint condition. There are cases where this function is provided to the task itself and where it is provided to the interrupt verification program. In both cases, the CPU time of the instruction execution unit 37 is consumed, and the same problem as described above occurs.

【0027】本発明は以上のような問題に鑑みて成され
たものであり、その目的は、命令実行装置のCPU時間
を消費することなく、リアルタイム・マルチタスクプロ
グラムの検証に必要な割り込み要求を効率的に発生させ
ることにより、検証時間の短縮と検証結果の精度を向上
させることができるプログラム検証装置を提供すること
にある。
The present invention has been made in view of the above problems, and an object of the present invention is to provide an interrupt request necessary for verification of a real-time multitask program without consuming CPU time of an instruction execution unit. It is an object of the present invention to provide a program verification device that can reduce the verification time and improve the accuracy of the verification result by generating efficiently.

【0028】[0028]

【課題を解決するための手段】上記目的を達成するた
め、本発明のプログラム検証装置は、複数のタスクと割
り込み処理タスクからなるアプリケーションプログラム
を格納する外部メモリと、該外部メモリに格納されてい
る複数のタスクと割り込み処理タスクをディスパッチし
ながら前記アプリケーションプログラムを実行する命令
実行装置と、前記割り込み処理タスクがディスパッチさ
れた際の前記アプリケーションプログラムの試験対象タ
スクの実行時刻とその試験対象タスクの要求実行時間と
を比較する割り込み試験装置とからなり、前記命令実行
装置は、前記複数のタスクの実行中に前記割り込み試験
装置から出力される割り込み信号によって前記割り込み
処理タスクをディスパッチし、該割り込み処理タスクの
実行終了後、前記複数のタスクの実行を再開させると共
に、前記アプリケーションプログラムの実行期間中、単
位時間毎にクロック信号を前記割り込み試験装置へ出力
するものであり、前記割り込み試験装置は、前記命令実
行装置から出力される前記クロック信号に基づき、前記
アプリケーションプログラムの試験対象タスクの実行時
間を計測するカウンタと、前記アプリケーションプログ
ラムの試験対象タスクの開始アドレスを保持し、前記命
令実行装置が出力する該開始アドレスを監視することに
より、試験対象タスクの実行開始と同時に割り込み条件
指示信号を出力する計測開始アドレス保持手段と、該計
測開始アドレス保持手段から出力される前記割り込み条
件指示信号に基づき、割り込み発生時間を指示する計測
条件指示手段と、該計測条件指示手段によって指示され
る割り込み発生時間を保持する計測条件保持手段と、該
計測条件保持手段に保持されている割り込み発生時間と
前記カウンタによって計測されている実行時間とを比較
し、一致した場合に割り込み信号を前記命令実行装置に
出力する割り込み発生手段と、前記アプリケーションプ
ログラムの前記要求実行時間を保持する要求実行時間保
持手段と、前記アプリケーションプログラムの試験対象
タスクの終了アドレスを保持し、前記命令実行装置が出
力する該終了アドレスを監視することにより、試験対象
タスクの終了と同時に計測終了信号を出力する計測終了
アドレス保持手段と、該計測終了アドレス保持手段から
出力される計測終了信号に基づき、前記カウンタによっ
て計測された前記アプリケーションプログラムの終了時
刻と前記要求実行時間保持手段に保持されている前記要
求実行時間とを比較する要求実行時間比較手段と、該要
求実行時間比較手段による比較結果を保持する計測結果
保持手段とからなっている。
In order to achieve the above object, a program verifying apparatus of the present invention includes an external memory for storing an application program including a plurality of tasks and an interrupt processing task, and the external memory. An instruction execution device that executes the application program while dispatching a plurality of tasks and an interrupt processing task, an execution time of a test target task of the application program when the interrupt processing task is dispatched, and a request execution of the test target task The instruction execution device dispatches the interrupt processing task according to an interrupt signal output from the interrupt test device during execution of the plurality of tasks, and the interrupt processing device compares the time with the interrupt test device. After execution, While restarting the execution of the task of, while outputting the clock signal to the interrupt test device for each unit time during the execution period of the application program, the interrupt test device outputs the clock signal from the instruction execution device. A counter that measures the execution time of the test target task of the application program based on a clock signal and a start address of the test target task of the application program are held, and the start address output by the instruction execution device is monitored. A measurement start address holding means for outputting an interrupt condition instruction signal at the same time as the execution of the task to be tested, and a measurement condition instruction for instructing an interrupt generation time based on the interrupt condition instruction signal output from the measurement start address holding means. Means and means for instructing the measurement condition Therefore, the measurement condition holding means for holding the interrupt generation time instructed is compared with the interrupt generation time held in the measurement condition holding means and the execution time measured by the counter, and if they match, the interrupt signal To the instruction execution device, a request execution time holding means for holding the request execution time of the application program, and an end address of a test target task of the application program, By monitoring the end address to be output, a measurement end address holding unit that outputs a measurement end signal simultaneously with the end of the test target task, and a counter based on the measurement end signal output from the measurement end address holding unit End time of the measured application program And request execution time comparing means for comparing the request execution time held in the request execution time holding means, and measurement result holding means for holding the comparison result by the request execution time comparing means.

【0029】[0029]

【0030】このような構成によれば、割り込み試験装
置を備えたので、命令実行装置のCPU時間を消費する
ことなくリアルタイム・マルチタスクプログラムの検証
に必要な割り込みを効率的に発生させることができる。
また、プログラムの終了時刻と要求実行時間とを比較す
ることで検証時間の短縮と検証結果の精度を向上させる
ことができる。
According to this structure, since the interrupt test device is provided, it is possible to efficiently generate the interrupt required for verification of the real-time multitask program without consuming the CPU time of the instruction execution device. .
Further, by comparing the program end time and the required execution time, the verification time can be shortened and the accuracy of the verification result can be improved.

【0031】又、本発明のプログラム検証装置は更に、
前記計測開始アドレス保持手段は、前記試験対象タスク
の実行開始と同時にカウンタリセット信号を出力し、前
記カウンタは、前記カウンタリセット信号によって計測
した実行時間をリセットすることを特徴とする。
Further, the program verification apparatus of the present invention further comprises
The measurement start address holding unit outputs a counter reset signal simultaneously with the start of execution of the test target task, and the counter resets the execution time measured by the counter reset signal.

【0032】これにより、アプリケーションプログラム
を実行させるごとに、当該タスクの実行開始と同時にカ
ウンタの計測値が自動的にリセットされ、アプリケーシ
ョンプログラムの実行時間の計測を再開させることがで
きる。
With this, every time the application program is executed, the measurement value of the counter is automatically reset at the same time when the execution of the task is started, and the measurement of the execution time of the application program can be restarted.

【0033】又、本発明のプログラム検証装置は更に、
前記計測条件保持手段は、前記割り込み発生時間を複数
保持し、前記計測条件指示手段は、前記計測条件保持手
段に保持されている複数の割り込み発生時間のうちのい
ずれか1つを指示し、前記計測結果保持手段は、前記要
求実行時間比較手段による比較結果を、前記計測条件指
示手段によって指示された1つの割り込み発生時間と対
応付けて保持することを特徴とする。
Further, the program verification apparatus of the present invention further comprises
The measurement condition holding means holds a plurality of the interrupt generation times, and the measurement condition instructing means instructs one of the plurality of interrupt generation times held in the measurement condition holding means, The measurement result holding means holds the comparison result by the request execution time comparing means in association with one interrupt generation time instructed by the measurement condition instructing means.

【0034】これにより、予め複数の任意の割り込み発
生時間を設定できるので、アプリケーションプログラム
の実行が開始されるごとに異なる割り込み発生時間を指
示することができる。また、指示された割り込み発生時
間とこの割り込み発生時間による比較結果とを対応付け
れるので、検証の効率が向上する。
With this, since a plurality of arbitrary interrupt generation times can be set in advance, different interrupt generation times can be designated each time the execution of the application program is started. Further, since the instructed interrupt generation time and the comparison result by the interrupt generation time can be associated with each other, the efficiency of verification is improved.

【0035】[0035]

【発明の実施の形態】以下、本発明の実施形態を図面に
基づいて説明する。図1は、本発明のプログラム検証装
置に係わる一実施形態を示すブロック図である。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the program verification device of the present invention.

【0036】同図において、このプログラム検証装置
は、大きくは外部メモリ1と、命令実行装置3、割り込
み試験装置5とから構成されている。
In FIG. 1, the program verification device is roughly composed of an external memory 1, an instruction execution device 3, and an interrupt test device 5.

【0037】外部メモリ1は、オペレーティングシステ
ム、及び複数のタスクと割り込み処理タスクから構成さ
れたアプリケーションプログラムを格納し、アドレスバ
ス7を介してバス9と接続されている。
The external memory 1 stores an operating system and an application program composed of a plurality of tasks and interrupt processing tasks, and is connected to a bus 9 via an address bus 7.

【0038】同様にアドレスバス7を介してバス9と接
続されている命令実行装置3は、一般的に用いられてい
る命令実行装置であり、外部メモリ1に格納されている
複数のタスクと割り込み処理タスクをディスパッチしな
がらアプリケーションプログラムを実行する。
Similarly, the instruction execution unit 3 connected to the bus 9 via the address bus 7 is a commonly used instruction execution unit, and includes a plurality of tasks and interrupts stored in the external memory 1. Execute application programs while dispatching processing tasks.

【0039】この命令実行装置3は、複数のタスクの実
行中に割り込み試験装置5から割り込み信号IRSが出
力されると、割り込み許可ならば割り込み処理タスクを
ディスパッチし、割り込み処理タスクの実行終了後、複
数のタスクの実行を再開させる。また、アプリケーショ
ンプログラムの実行期間中、単位時間毎にクロック信号
CLKを常時割り込み試験装置5へ出力している。
When the interrupt test device 5 outputs the interrupt signal IRS during execution of a plurality of tasks, the instruction execution device 3 dispatches the interrupt processing task if the interrupt is permitted, and after the execution of the interrupt processing task is completed, Resume execution of multiple tasks. Further, during the execution period of the application program, the clock signal CLK is constantly output to the interrupt test device 5 every unit time.

【0040】割り込み試験装置5は、本発明の特徴とな
る装置であり、様々な時間による割り込み要求を命令実
行装置3に発生させ、割り込み処理タスクがディスパッ
チされることによるアプリケーションプログラムの終了
時刻と、要求実行時間(時間的制約条件)とを比較す
る。さらに、比較した結果を、割り込み発生時間に対応
付けて保持する機能を有している。
The interrupt test device 5 is a device which is a feature of the present invention. The interrupt test device 5 causes the instruction execution device 3 to generate interrupt requests at various times, and the end time of the application program when the interrupt processing task is dispatched. Compare with the required execution time (time constraint). Further, it has a function of holding the comparison result in association with the interrupt generation time.

【0041】カウンタ11は、命令実行装置3から出力
されるクロック信号CLKに基づき、アプリケーション
プログラムが実行開始されてからの実行時間を計測す
る。また、計測開始アドレス保持手段13から出力され
るカウンタリセット信号CLRによって、計測した実行
時間をリセットする。
The counter 11 measures the execution time after the execution of the application program is started, based on the clock signal CLK output from the instruction execution unit 3. Further, the measured execution time is reset by the counter reset signal CLR output from the measurement start address holding unit 13.

【0042】計測開始アドレス保持手段13は、アプリ
ケーションプログラムの試験対象タスクの開始アドレス
を保持しており、監視しているアドレスバス7の値と一
致すると同時にカウンタリセット信号CLR及び割り込
み条件指示更新信号INCをアクティブにする。
The measurement start address holding means 13 holds the start address of the test target task of the application program, and coincides with the value of the monitored address bus 7, and at the same time, the counter reset signal CLR and the interrupt condition instruction update signal INC. To activate.

【0043】計測条件指示手段15は、計測開始アドレ
ス保持手段13から出力される割り込み条件指示更新信
号INCがアクティブになると、計測条件すなわち割り
込み発生時間の更新を計測条件・結果保持手段17に対
して指示する。
When the interrupt condition instruction update signal INC output from the measurement start address holding unit 13 becomes active, the measurement condition instruction unit 15 updates the measurement condition, that is, the interrupt generation time, to the measurement condition / result holding unit 17. Give instructions.

【0044】計測条件・結果保持手段17は、計測条件
指示手段15によって更新指示される計測条件と、これ
に対応する計測結果とを複数保持する。
The measurement condition / result holding means 17 holds a plurality of measurement conditions that are instructed to be updated by the measurement condition instructing means 15 and the measurement results corresponding thereto.

【0045】割り込み発生手段19は、計測条件指示手
段15で指定された計測条件とカウンタ11によって計
測されている値TIMEとを比較し、一致した場合に割
り込み信号IRSをアクティブにして命令実行装置3に
割り込み要求を行う。
The interrupt generating means 19 compares the measurement condition designated by the measurement condition instructing means 15 with the value TIME measured by the counter 11, and when they match, activates the interrupt signal IRS to activate the instruction executing device 3 Interrupt request to.

【0046】要求実行時間保持手段21は、アプリケー
ションプログラムの要求実行時間(時間的制約条件)を
保持する。
The request execution time holding means 21 holds the request execution time (time constraint condition) of the application program.

【0047】計測終了アドレス保持手段23は、アプリ
ケーションプログラムの試験対象タスクの終了アドレス
を保持していおり、監視しているアドレスバス7と一致
すると同時に計測終了信号ETRGをアクティブにす
る。
The measurement end address holding means 23 holds the end address of the task to be tested of the application program, and makes the measurement end signal ETRG active at the same time when it coincides with the monitored address bus 7.

【0048】要求実行時間比較手段25は、計測終了ア
ドレス保持手段23から出力される計測終了信号ETR
Gがアクティブになると、カウンタ11によって計測さ
れたアプリケーションプログラムの終了時刻(TIM
E)と、要求実行時間保持手段21に保持されている要
求実行時間とを比較し、比較結果を計測条件・結果保持
手段17へ出力する。
The request execution time comparison means 25 has a measurement end signal ETR output from the measurement end address holding means 23.
When G becomes active, the end time of the application program measured by the counter 11 (TIM
E) is compared with the required execution time held in the required execution time holding means 21, and the comparison result is output to the measurement condition / result holding means 17.

【0049】このように、本発明のプログラム検証装置
に係わる一実施形態は構成されており、次にこのプログ
ラム検証装置による時間的制約条件の対象となるタスク
の割り込み検証について説明する。
As described above, one embodiment relating to the program verifying apparatus of the present invention is configured. Next, the interrupt verifying of the task subject to the time constraint condition by the program verifying apparatus will be described.

【0050】一般にタスクの生存区間は、命令実行装置
3がタスクの開始位置の命令を実行してから、終了位置
の命令を実行するまでと考えられる。つまり、タスクの
開始と終了は、命令実行装置3が出力するアドレスバス
7の値で区別できる。従って、計測開始アドレス保持手
段13にタスクの開始アドレス、計測終了アドレス保持
手段23にタスクの終了アドレスを設定すると、計測終
了アドレス保持手段23からの計測終了信号ETRGが
アクティブになった時のカウンタ11の値はタスクの終
了時刻を示している。
Generally, the life cycle of a task is considered to be from when the instruction execution device 3 executes the instruction at the start position of the task to when it executes the instruction at the end position. That is, the start and end of the task can be distinguished by the value of the address bus 7 output by the instruction execution device 3. Therefore, when the task start address is set in the measurement start address holding means 13 and the task end address is set in the measurement end address holding means 23, the counter 11 when the measurement end signal ETRG from the measurement end address holding means 23 becomes active The value of indicates the end time of the task.

【0051】タスクの時間的制約条件を要求実行時間保
持手段21に格納しておくと、要求実行時間比較手段2
5による時間的制約条件を満足しているかどうかの比較
結果は、計測条件指示手段15で指示された計測条件に
対応する計測結果に格納される事になる。
When the task time constraint conditions are stored in the required execution time holding means 21, the required execution time comparison means 2
The comparison result of whether or not the time constraint condition of 5 is satisfied is stored in the measurement result corresponding to the measurement condition instructed by the measurement condition instructing means 15.

【0052】検証に必要な割り込み要求の発生時間は、
タスクの開始時間からの相対時間として予め計測条件に
格納しておけばよい。なぜなら、計測開始アドレス保持
手段13によりタスクの開始が検出された時点で、カウ
ンタリセット信号CLRによりカウンタ11がゼロクリ
アされるからである。
The generation time of the interrupt request required for verification is
It may be stored in the measurement condition in advance as a relative time from the task start time. This is because the counter 11 is cleared to zero by the counter reset signal CLR when the task start is detected by the measurement start address holding unit 13.

【0053】割り込み発生手段19が、計測条件指示手
段15で指示される計測条件と、クロック信号CLKで
インクリメントされるカウンタ11の計測時間とを比較
し、一致した時点で割り込み信号IRSがアクティブと
なって割り込み要求が行われる。
The interrupt generation means 19 compares the measurement condition instructed by the measurement condition instruction means 15 with the measurement time of the counter 11 incremented by the clock signal CLK, and when they match, the interrupt signal IRS becomes active. Interrupt request is made.

【0054】割り込み処理タスクにより延びたタスクの
実行時間と要求実行時間との比較結果は、計測条件と対
応付けられて計測結果に格納される。
The comparison result of the task execution time extended by the interrupt processing task and the request execution time is stored in the measurement result in association with the measurement condition.

【0055】計測条件指示手段15は、計測開始アドレ
ス保持手段13がタスクの開始を検出する毎に更新さ
れ、計測条件と計測結果を格納する位置を変更してい
く。計測条件指示手段15が、計測条件と計測結果の格
納領域の底に達するとそこで検証は終了となる。
The measurement condition instructing means 15 is updated every time the measurement start address holding means 13 detects the start of a task, and changes the position for storing the measurement condition and the measurement result. When the measurement condition instructing means 15 reaches the bottom of the storage area for the measurement condition and the measurement result, the verification ends there.

【0056】以上述べたように、計測開始アドレス保持
手段13、計測終了アドレス保持手段23、要求実行時
間保持手段21、及び計測条件は、検証の実行に先だっ
て設定する事ができるため、検証中には命令実行装置3
のCPUが消費されることはない。また、計測条件は時
間的制約条件の対象となるタスクの開始時点からの相対
時間で指定することができ、検証結果は実行終了後に、
計測条件と対応付けされている計測結果で確認できるた
め、効率よく検証ができる。
As described above, the measurement start address holding means 13, the measurement end address holding means 23, the required execution time holding means 21, and the measurement conditions can be set prior to the execution of the verification, and therefore, during the verification. Is the instruction execution unit 3
CPU is never consumed. In addition, the measurement condition can be specified by the relative time from the start time of the task subject to the time constraint condition, and the verification result is
Since it can be confirmed by the measurement result associated with the measurement condition, the verification can be performed efficiently.

【0057】[0057]

【発明の効果】以上、本発明のプログラム検証装置によ
れば、命令実行装置のCPU時間を消費することなく、
リアルタイム・マルチタスクプログラムの検証に必要な
割り込みを効率的に発生させ、かつ時間的制約条件を満
たすかどうかを判断させることができるので、検証時間
の短縮と検証結果の精度を向上させることができる。
As described above, according to the program verification device of the present invention, the CPU time of the instruction execution device is not consumed,
Since it is possible to efficiently generate interrupts required for verification of real-time multitasking programs and to judge whether time constraint conditions are satisfied, it is possible to shorten verification time and improve the accuracy of verification results. .

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のプログラム検証装置に係わる一実施形
態のブロック図。
FIG. 1 is a block diagram of an embodiment of a program verification device according to the present invention.

【図2】リアルタイム・マルチタスクプログラムの実行
の様子を示すタイミング図。
FIG. 2 is a timing chart showing how a real-time multitask program is executed.

【図3】図2と同様なタイミング図。FIG. 3 is a timing diagram similar to FIG.

【図4】図2,3と同様なタイミング図。FIG. 4 is a timing diagram similar to FIGS.

【図5】図2〜4と同様なタイミング図。FIG. 5 is a timing diagram similar to FIGS.

【図6】従来の検証技術を説明するためのブロック図。FIG. 6 is a block diagram for explaining a conventional verification technique.

【符号の説明】[Explanation of symbols]

1 外部メモリ 3 命令実行装置 5 割り込み試験装置 7 アドレスバス 9 バス 11 カウンタ 13 計測開始アドレス保持手段 15 計測条件指示手段 17 計測条件・結果保持手段 19 割り込み発生手段 21 要求実行時間保持手段 23 計測終了アドレス保持手段 25 要求実行時間比較手段 1 External memory 3 Instruction execution device 5 Interrupt test equipment 7 address bus 9 buses 11 counter 13 Measurement start address holding means 15 Measuring condition instruction means 17 Measuring condition / result holding means 19 Interrupt generation means 21 Request execution time holding means 23 Measurement end address holding means 25 Request execution time comparison means

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−108418(JP,A) 特開 平2−271437(JP,A) 特開 平5−250186(JP,A) 特開 平2−206848(JP,A) 特開 昭63−58550(JP,A) 特開 昭63−289653(JP,A) 実開 昭58−190751(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 11/28 - 11/34 G06F 9/46 ─────────────────────────────────────────────────── --- Continuation of the front page (56) References JP-A-5-108418 (JP, A) JP-A-2-271437 (JP, A) JP-A-5-250186 (JP, A) JP-A-2- 206848 (JP, A) JP 63-58550 (JP, A) JP 63-289653 (JP, A) Actual development 58-190751 (JP, U) (58) Fields investigated (Int.Cl. 7 , DB name) G06F 11/28-11/34 G06F 9/46

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のタスクと割り込み処理タスクから
なるアプリケーションプログラムを格納する外部メモリ
と、該外部メモリに格納されている複数のタスクと割り
込み処理タスクをディスパッチしながら前記アプリケー
ションプログラムを実行する命令実行装置と、前記割り
込み処理タスクがディスパッチされた際の前記アプリケ
ーションプログラムの試験対象タスクの実行時刻とその
試験対象タスクの要求実行時間とを比較する割り込み試
験装置とからなり、前記命令実行装置は、前記複数のタ
スクの実行中に前記割り込み試験装置から出力される割
り込み信号によって前記割り込み処理タスクをディスパ
ッチし、該割り込み処理タスクの実行終了後、前記複数
のタスクの実行を再開させると共に、前記アプリケーシ
ョンプログラムの実行期間中、単位時間毎にクロック信
号を前記割り込み試験装置へ出力するものであり、前記
割り込み試験装置は、前記命令実行装置から出力される
前記クロック信号に基づき、前記アプリケーションプロ
グラムの試験対象タスクの実行時間を計測するカウンタ
と、前記アプリケーションプログラムの試験対象タスク
の開始アドレスを保持し、前記命令実行装置が出力する
該開始アドレスを監視することにより、試験対象タスク
の実行開始と同時に割り込み条件指示信号を出力する計
測開始アドレス保持手段と、該計測開始アドレス保持手
段から出力される前記割り込み条件指示信号に基づき、
割り込み発生時間を指示する計測条件指示手段と、該計
測条件指示手段によって指示される割り込み発生時間を
保持する計測条件保持手段と、該計測条件保持手段に保
持されている割り込み発生時間と前記カウンタによって
計測されている実行時間とを比較し、一致した場合に割
り込み信号を前記命令実行装置に出力する割り込み発生
手段と、前記アプリケーションプログラムの前記要求実
行時間を保持する要求実行時間保持手段と、前記アプリ
ケーションプログラムの試験対象タスクの終了アドレス
を保持し、前記命令実行装置が出力する該終了アドレス
を監視することにより、試験対象タスクの終了と同時に
計測終了信号を出力する計測終了アドレス保持手段と、
該計測終了アドレス保持手段から出力される計測終了信
号に基づき、前記カウンタによって計測された前記アプ
リケーションプログラムの終了時刻と前記要求実行時間
保持手段に保持されている前記要求実行時間とを比較す
る要求実行時 間比較手段と、該要求実行時間比較手段に
よる比較結果を保持する計測結果保持手段とからなる
ログラム検証装置。
1. An external memory for storing an application program including a plurality of tasks and an interrupt processing task, and an instruction execution for executing the application program while dispatching the plurality of tasks and the interrupt processing task stored in the external memory. The device, and an interrupt test device for comparing the execution time of the test target task of the application program when the interrupt processing task is dispatched and the request execution time of the test target task , the instruction execution device, Multiple tags
The interrupt output from the interrupt tester during
The interrupt processing task is executed by the interrupt signal.
Switch, and after execution of the interrupt processing task,
Restart the execution of the task of
The clock signal is output every unit time during the execution of the program.
Is output to the interrupt test device,
The interrupt test device outputs from the instruction execution device
Based on the clock signal, the application program
Counter for measuring the execution time of the task under test in grams
And the task to be tested by the application program
Holds the start address of the
By monitoring the start address, the test target task
When the execution of the
Measuring start address holding means and measuring start address holding means
Based on the interrupt condition instruction signal output from the stage,
Measuring condition instructing means for instructing the interrupt generation time,
The interrupt generation time instructed by the measurement condition instruction means
The measuring condition holding means to hold and the holding to the measuring condition holding means
Depending on the existing interrupt generation time and the counter
Compare the measured execution time and if there is a match,
Generate an interrupt that outputs an interrupt signal to the instruction execution unit
Means and the request execution of the application program
Request execution time holding means for holding a line time, and the application
End address of the task to be tested by the application program
And the end address output by the instruction execution unit
By monitoring the
Measurement end address holding means for outputting a measurement end signal,
Measurement end signal output from the measurement end address holding means
The counter measured by the counter based on
Application program end time and the requested execution time
Comparing with the requested execution time held in the holding means
That requests an execution time between the comparing means, to the request execution time comparison means
A program verification device comprising a measurement result holding means for holding the comparison result according to the above .
【請求項2】 前記計測開始アドレス保持手段は、前記
試験対象タスクの実行開始と同時にカウンタリセット信
号を出力し、前記カウンタは、前記カウンタリセット信
号によって計測した実行時間をリセットすることを特徴
とする請求項記載のプログラム検証装置。
2. The measurement start address holding means outputs a counter reset signal at the same time as the execution of the test target task is started, and the counter resets the execution time measured by the counter reset signal. The program verification device according to claim 1 .
【請求項3】 前記計測条件保持手段は、前記割り込み
発生時間を複数保持し、前記計測条件指示手段は、前記
計測条件保持手段に保持されている複数の割り込み発生
時間のうちのいずれか1つを指示し、前記計測結果保持
手段は、前記要求実行時間比較手段による比較結果を、
前記計測条件指示手段によって指示された1つの割り込
み発生時間と対応付けて保持することを特徴とする請求
1及び2記載のプログラム検証装置。
3. The measurement condition holding means holds a plurality of the interrupt generation times, and the measurement condition instruction means holds one of a plurality of interrupt generation times held in the measurement condition holding means. The measurement result holding means indicates the comparison result by the request execution time comparison means,
3. The program verification device according to claim 1, wherein the program verification device is held in association with one interrupt generation time instructed by the measurement condition instructing means.
JP03634397A 1997-02-20 1997-02-20 Program verification device Expired - Fee Related JP3361949B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03634397A JP3361949B2 (en) 1997-02-20 1997-02-20 Program verification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03634397A JP3361949B2 (en) 1997-02-20 1997-02-20 Program verification device

Publications (2)

Publication Number Publication Date
JPH10232794A JPH10232794A (en) 1998-09-02
JP3361949B2 true JP3361949B2 (en) 2003-01-07

Family

ID=12467198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03634397A Expired - Fee Related JP3361949B2 (en) 1997-02-20 1997-02-20 Program verification device

Country Status (1)

Country Link
JP (1) JP3361949B2 (en)

Also Published As

Publication number Publication date
JPH10232794A (en) 1998-09-02

Similar Documents

Publication Publication Date Title
US9690603B2 (en) Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
EP1685486B1 (en) Interrupt handling in an embedded multi-threaded processor to avoid priority inversion and maintain real-time operation
US20120029659A1 (en) Safety controller and safety control method
JP2003288237A (en) Device and method for measuring execution time in controller
US20040039935A1 (en) Method and device for measuring the execution time of a real task in a real time system
US20080172579A1 (en) Test Device For Verifying A Batch Processing
CN113377566B (en) UEFI-based server starting method, device and storage medium
EP0290942B1 (en) Guest machine execution control system for virtual machine system
JP3361949B2 (en) Program verification device
US10761512B2 (en) Numerical controller
US11307973B2 (en) Method and device for testing robustness and stability of SMM, and storage medium
US7376822B2 (en) Method of initializing multiple devices using job scheduler
US20100107169A1 (en) Periodical task execution apparatus, periodical task execution method, and storage medium
US20130007758A1 (en) Multi-core processor system, thread switching control method, and computer product
JPH0588933A (en) Parallel processing system with debugging function
JP5425445B2 (en) Processing control system, method and program
US20230176882A1 (en) Method for simulating a control unit on a computer based on the autosar standard, and computer therefor
JP2000089971A (en) Method and device for controlling interruption order
JPH0324637A (en) Method for managing resource for program debagging
JP3231505B2 (en) MPU emulator device
JP2550708B2 (en) Debug method
JP2002318713A (en) Cpu occupancy time measuring method
JPH03158936A (en) Testing method for program
JP2002251299A (en) Program tracing device
CN118227278A (en) Scheduling of duplicate threads

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081018

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20081018

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091018

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101018

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111018

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111018

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121018

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees