JP2006293427A - Software evaluation device and system - Google Patents
Software evaluation device and system Download PDFInfo
- Publication number
- JP2006293427A JP2006293427A JP2005109081A JP2005109081A JP2006293427A JP 2006293427 A JP2006293427 A JP 2006293427A JP 2005109081 A JP2005109081 A JP 2005109081A JP 2005109081 A JP2005109081 A JP 2005109081A JP 2006293427 A JP2006293427 A JP 2006293427A
- Authority
- JP
- Japan
- Prior art keywords
- value
- register
- holding
- maximum value
- processing time
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
この発明は、ソフトウェア評価装置及びシステムに関し、特に開発等を行ったソフトウェアの処理時間を計測して評価する評価装置及びシステムに関するものである。 The present invention relates to a software evaluation apparatus and system, and more particularly to an evaluation apparatus and system that measures and evaluates the processing time of software that has been developed.
プロセッサのメモリ上に搭載するソフトウェアの開発時においては、その処理に要する時間を測定することが一般的に行われている。特に、オーディオシステムや画像処理システムなど一定時間長のフレーム単位で処理を行うシステムでは、フレーム期間の中で必要な処理を完了させなければならないので、ソフトウェアの開発時においては、その処理時間、特に最大処理時間を測定し、処理時間が一定時間に収まることを保証することが要求されている。 When developing software to be loaded on the memory of a processor, it is common to measure the time required for the processing. Especially in systems that perform processing in units of frames of a certain time length, such as audio systems and image processing systems, the necessary processing must be completed within the frame period. It is required to measure the maximum processing time and to ensure that the processing time is within a certain time.
すなわち、フレーム単位で処理を行うシステムでは、ソフトウェアの処理時間が想定された時間よりも大きくなり、一定時間長のフレーム期間内に処理が収まらなかった場合には、オーディオシステムであれば音切れが発生し、画像処理システムであれば画像の不連続が発生するからである。 In other words, in a system that performs processing in units of frames, the software processing time becomes longer than the expected time, and if the processing does not fit within the frame period of a certain length of time, the audio system will be interrupted. This is because image discontinuity occurs in an image processing system.
ところが、一定時間内に完了しなければならない処理には、データ処理の他に、例えばメモリキャッシュやバスの状態など処理単位で変化するプロセッサやシステムの状態が含まれる。これらは、プロセッサ内外の様々な要因に依存して変化する。したがって、ソフトウェアの処理時間の測定は、シミュレーションによる方法には適さない。 However, the processing that must be completed within a certain period of time includes, in addition to data processing, the state of a processor or system that changes in units of processing, such as the state of a memory cache or bus. These vary depending on various factors inside and outside the processor. Therefore, measurement of software processing time is not suitable for a simulation method.
そのため、例えば、テキサスインスツメント社が提供するオーディオシステムや画像処理システム(C54xなどの)に搭載されるデジタルシグナルプロセッサは、ソフトウェアの開発時・デバッグ時に使用可能なタイマ機能を実装している。 For this reason, for example, a digital signal processor installed in an audio system or an image processing system (such as C54x) provided by Texas Instruments has a timer function that can be used during software development and debugging.
また、特許文献1では、予め設定された処理時間の最大値と測定された処理時間とを比較し、プロセッサの有効・無効を設定するマイクロプロセッサの動作試験装置が提案されている。このマイクロプロセッサの動作試験装置では、処理時間を複数回測定した結果をメモリに格納し、メモリから外部制御装置(パーソナルコンピュータ)に転送し、その外部制御装置内で算出した最大値を使用している。
Further,
また、特許文献2では、任意の異なる2つのアドレスで決定される区間の処理時間を測定し、処理時間の最大値を比較器によって自動的に測定することが可能なプロセッサが開示されている。
Further,
しかしながら、ソフトウェアの処理時間をタイマ機能によって測定する方法では、ソフトウェアの処理時間は一定でないので、処理時間の最大値の測定では、繰り返し測定し最大値を取得しなければならず、煩雑である。 However, in the method of measuring the software processing time by the timer function, the software processing time is not constant. Therefore, in the measurement of the maximum value of the processing time, it is necessary to repeatedly measure and acquire the maximum value, which is complicated.
また、特許文献1に開示される処理時間の最大値取得方法では、最大処理時間を測定するためには、外部制御装置を介さなければならないので、プロセッサで実行中のソフトウェアに対してリアルタイムにその処理時間の最大値を測定することができない。したがって、ソフトウェアの評価時間や開発時間が増大し、開発コストが増大する。
Further, in the method for obtaining the maximum value of processing time disclosed in
また、特許文献2に記載されたプロセッサが有するコントローラは、開始アドレスと終了アドレスが異なる(開始アドレス<終了アドレス)場合には、ステップ数カウンタに対して開始信号、終了信号を送信し、実行ステップ数の最大値を測定することは可能であるが、開始アドレスと終了アドレスが一致した場合は、実行ステップ数の最大値を測定することができない。すなわち、繰り返し実行される処理において、一つのアドレス(開始アドレス)を指定することにより、繰り返し実行される処理のステップ数の最大値を設定することは不可能である。
The controller included in the processor described in
加えて、オーディオシステムや画像システムのようなフレーム単位で処理が実行されるシステムにおいては、一定時間長のフレーム期間内に必要な処理が完了するか否かの検査時に、フレーム処理の開始アドレスに、処理量測定の開始と終了のアドレスを設定することが考えられる。この場合、フレーム処理完了時の処理アドレスを決定する必要がない。また、フレーム処理が分岐している場合など、終了アドレスが一点に設定できないような処理も多分に想定される。このような場合に、特許文献2に記載されたプロセッサでは、測定できない。
In addition, in a system in which processing is performed in units of frames, such as an audio system or an image system, the frame processing start address is used when checking whether or not necessary processing is completed within a certain length of frame period. It is conceivable to set the start and end addresses of the processing amount measurement. In this case, there is no need to determine a processing address when frame processing is completed. In addition, a process in which the end address cannot be set to one point, such as when the frame process is branched, is also assumed. In such a case, the processor described in
この発明は、上記に鑑みてなされたものであり、プロセッサのメモリ上に搭載されるソフトウェアの任意の開始アドレスと終了アドレスとで決定される区間の処理時間を外部の装置を介さずに測定することが可能なソフトウェア評価装置及びシステムを得ることを目的とする。 The present invention has been made in view of the above, and measures the processing time of a section determined by an arbitrary start address and end address of software installed in the memory of a processor without using an external device. An object of the present invention is to obtain a software evaluation apparatus and system capable of performing the above.
上述した目的を達成するために、この発明にかかるソフトウェア評価装置は、プロセッサが実行する評価対象プログラムにおける処理時間測定の開始アドレス及び終了アドレスを任意に設定できるレジスタと、実行中のプログラムカウンタのカウント値と前記開始アドレスの値との一致不一致を比較してアドレス一致を検出することを前記プログラムが終了するまで繰り返す第1の比較手段と、実行中の前記プログラムカウンタのカウント値と前記終了アドレスの値との一致不一致を比較してアドレス一致を検出することを前記プログラムが終了するまで繰り返す第2の比較手段と、前記第1の比較手段がアドレス一致を検出したタイミングから前記第2の比較手段がアドレス一致を検出したタイミングまでの処理時間を測定することを前記プログラムが終了するまで繰り返す時間測定手段と、処理時間の最大値を保持するための最大値保持レジスタと、前記時間測定手段が測定した処理時間と前記最大値保持レジスタの保持値との大小関係を比較し、測定した前記処理時間が前記保持値よりも大きいときは当該測定した処理時間を新たな保持値として前記最大値保持レジスタに格納することを前記プログラムが終了するまで繰り返す最大値収集手段とを備えることを特徴とする。 In order to achieve the above object, a software evaluation apparatus according to the present invention includes a register that can arbitrarily set a start address and an end address of processing time measurement in an evaluation target program executed by a processor, and a count of a program counter being executed. A first comparison unit that repeats until an end of the program is detected by comparing a match / mismatch between the value and the value of the start address until the program ends, and the count value of the program counter being executed and the end address A second comparison unit that repeats the detection of an address match by comparing a match with a value until the program ends, and the second comparison unit from the timing when the first comparison unit detects an address match. Measuring the processing time until the timing when the address match is detected. The time measurement means that repeats until the program ends, the maximum value holding register for holding the maximum value of the processing time, and the magnitude relationship between the processing time measured by the time measuring means and the holding value of the maximum value holding register A maximum value collecting means for comparing, when the measured processing time is greater than the held value, storing the measured processing time as a new held value in the maximum value holding register until the program ends; It is characterized by providing.
この発明によれば、評価対象プログラムにおいて繰り返し実行される2点間における処理時間の最大値を自動的に計測することができる。 According to this invention, it is possible to automatically measure the maximum value of the processing time between two points that are repeatedly executed in the evaluation target program.
この発明によれば、プロセッサのメモリ上に搭載されるソフトウェアの任意の開始アドレスと終了アドレスとで決定される区間の処理時間を外部の装置を介さずに測定することが可能なソフトウェア評価装置が得られるという効果を奏する。 According to the present invention, there is provided a software evaluation device capable of measuring a processing time of a section determined by an arbitrary start address and end address of software installed on a processor memory without using an external device. The effect is obtained.
以下に図面を参照して、この発明にかかるソフトウェア評価装置及びシステムの好適な実施の形態を詳細に説明する。 Exemplary embodiments of a software evaluation apparatus and system according to the present invention will be described below in detail with reference to the drawings.
実施の形態1.
図1は、この発明の実施の形態1によるソフトウェア評価装置の構成を示すブロック図である。図1において、PCは、プログラムカウンタである。11は、ソフトウェアの処理時間の測定を開始するアドレスを保持するための開始アドレス保持レジスタである。21は、ソフトウェアの処理時間の測定を終了するアドレスを保持するための終了アドレス保持レジスタである。sig_enは、処理時間測定イネーブル信号であり、イネーブル時は“1”レベル、デイネーブル時は“0”レベルとなる2値のレベル信号である。
FIG. 1 is a block diagram showing a configuration of a software evaluation apparatus according to
1は、実行中のPCのカウント値(PC値)と開始アドレスとを比較するための比較器である。2は、実行中のPCのカウント値(PC値)と開始アドレスとを比較するための比較器である。3は、ソフトウェアの処理時間測定結果と処理時間の最大値との比較を行うための比較器である。4は、ソフトウェアの処理時間の測定を行うための時間測定装置である。31は、ソフトウェアの処理時間の最大値を保持するための最大値保持レジスタである。41は、ソフトウェアの処理時間測定結果を保持するための測定値保持レジスタである。
次に、以上のように構成されるソフトウェア評価装置の動作について説明する。「手順T1」まず、最大値保持レジスタ31の値をゼロにする。また、時間測定装置4をリセットする。「手順T2」次に、開始アドレス保持レジスタ11に処理時間の測定を開始するアドレスを設定し、また、終了アドレス保持レジスタ21に処理時間の測定を終了するアドレスを設定する。「手順T3」そして、処理時間測定イネーブル信号sig_enをイネーブルにする(sig_en=“1”)。これによって、比較器1,2,3が比較動作を開始する。
Next, the operation of the software evaluation apparatus configured as described above will be described. [Procedure T1] First, the value of the maximum
「手順T4」すなわち、sig_en=“1”になると、比較器1は、実行中のPCのカウント値(PC値)と開始アドレス保持レジスタ11の保持値との一致不一致の比較動作を開始し、比較器2は、実行中のPCのカウント値(PC値)と終了アドレス保持レジスタ21の保持値との一致不一致の比較動作を開始し、比較器3は、最大値保持レジスタ31の保持値と測定値保持レジスタ41の保持値との大小関係の比較動作を開始する。
“Procedure T4”, that is, when sig_en = “1”, the
「手順T5」比較器1は、実行中のPCのカウント値(PC値)と開始アドレス保持レジスタ11の保持値との一致を検出すると、時間測定装置4に起動指令を発行する。時間測定装置4は、比較器1から起動指令を受けると、直ちに時間測定を開始する。
[Procedure T5] When the
「手順6」比較器2は、実行中のPCのカウント値(PC値)と終了アドレス保持レジスタ21の保持値との一致を検出すると、時間測定装置4に停止指令を発行する。時間測定装置4は、比較器2から停止指令を受けると、直ちに時間測定動作を停止し、測定結果(カウント値)を測定値保持レジスタ41に格納する。格納を終了すると、時間測定装置4はリセットされる。
[Procedure 6] When the
「手順T7」比較器3では、最大値保持レジスタ31の保持値と測定値保持レジスタ41の保持値との大小関係を比較し、測定値保持レジスタ41の保持値が最大値保持レジスタ31の保持値よりも大きいときは、測定値保持レジスタ41の保持値を最大値保持レジスタ31に転記して最大値を更新する一方、測定値保持レジスタ41の保持値が最大値保持レジスタ31の保持値よりも小さいとき、あるいは同じであるときは、最大値保持レジスタ31の保持値をそのままにしておく。
[Procedure T7] In the comparator 3, the magnitude relationship between the value held in the maximum
「手順T8」比較器3での上記した動作が終了した時点でプログラムが終了していない場合はプログラムが終了するまでの間、または、sig_en=“1”である場合はsig_en=“0”になるまでの間、「手順T5」〜「手順T7」の処理を繰り返す。その結果、開始アドレス=終了アドレスの場合も含めてプログラムの2点間で繰り返し実行される処理時間の最大値が最大値保持レジスタ31に保持される。
“Procedure T8” When the above-described operation in the comparator 3 is finished, if the program is not finished, until the program is finished, or if sig_en = “1”, sig_en = “0”. Until this time, the processing of “procedure T5” to “procedure T7” is repeated. As a result, the maximum value of the processing time repeatedly executed between two points of the program including the case where the start address = the end address is held in the maximum
このように、実施の形態1によれば、繰り返し実行されるプログラムでの2点間の最大処理時間を、外部装置を介することなく自動的に測定することができるので、ソフトウェアの評価が容易に行えるようになる。 As described above, according to the first embodiment, the maximum processing time between two points in a program that is repeatedly executed can be automatically measured without using an external device, which makes it easy to evaluate software. You can do it.
実施の形態2.
図2は、この発明の実施の形態2によるソフトウェア評価装置の構成を示すブロック図である。図2において、PCは、プログラムカウンタである。11−1〜11−Nは、ソフトウェアの処理時間の測定を開始するアドレスを保持するための開始アドレス保持レジスタである。21−1〜21−Nは、ソフトウェアの処理時間の測定を終了するアドレスを保持するための終了アドレス保持レジスタである。sig_enは、処理時間測定イネーブル信号であり、イネーブル時は“1”レベル、デイネーブル時は“0”レベルとなる2値のレベル信号である。
FIG. 2 is a block diagram showing the configuration of the software evaluation apparatus according to
1−1〜1−Nは、実行中のPCのカウント値(PC値)と開始アドレスとを比較するための比較器である。2−1〜2−Nは、実行中のPCのカウント値(PC値)と開始アドレスとを比較するための比較器である。3−1〜3−Nは、ソフトウェアの処理時間測定結果と処理時間の最大値との比較を行うための比較器である。4−1〜4−Nは、ソフトウェアの処理時間の測定を行うための時間測定装置である。31−1〜31−Nは、ソフトウェアの処理時間の最大値を保持するための最大値保持レジスタである。41−1〜41−Nは、ソフトウェアの処理時間測定結果を保持するための測定値保持レジスタである。 Reference numerals 1-1 to 1-N denote comparators for comparing the count value (PC value) of the PC being executed and the start address. 2-1 to 2-N are comparators for comparing the count value (PC value) of the PC being executed with the start address. 3-1 to 3-N are comparators for comparing the processing time measurement result of the software with the maximum value of the processing time. Reference numerals 4-1 to 4-N denote time measuring devices for measuring the processing time of software. 31-1 to 31-N are maximum value holding registers for holding the maximum value of the software processing time. 41-1 to 41-N are measurement value holding registers for holding processing time measurement results of software.
次に、以上のように構成されるソフトウェア評価装置の動作について説明する。「手順T11」まず、最大値保持レジスタ31−1〜31−Nの値をゼロにする。また、時間測定装置4−1〜4−Nをリセットする。「手順T12」次に、開始アドレス保持レジスタ11−1〜11−Nに処理時間の測定を開始するアドレスを設定し、また、終了アドレス保持レジスタ21−1〜21−Nに処理時間の測定を終了するアドレスを設定する。「手順T13」そして、処理時間測定イネーブル信号sig_enをイネーブルにする(sig_en=“1”)。これによって、比較器1−1〜1−N,比較器2−1〜2−N,比較器3−1〜3−Nがそれぞれ比較動作を開始する。 Next, the operation of the software evaluation apparatus configured as described above will be described. [Procedure T11] First, the values of the maximum value holding registers 31-1 to 31-N are set to zero. Further, the time measuring devices 4-1 to 4-N are reset. [Procedure T12] Next, the start address holding registers 11-1 to 11-N are set with addresses for starting processing time measurement, and the end address holding registers 21-1 to 21-N are measured for processing time. Set the address to end. “Procedure T13” Then, the processing time measurement enable signal sig_en is enabled (sig_en = “1”). Thereby, the comparators 1-1 to 1-N, the comparators 2-1 to 2-N, and the comparators 3-1 to 3-N start comparison operations, respectively.
「手順T14」すなわち、sig_en=“1”になると、比較器1−1〜1−Nは、実行中のPCのカウント値(PC値)と開始アドレス保持レジスタ11−1〜11−Nの保持値との一致不一致の比較動作を開始し、比較器2−1〜2−Nは、実行中のPCのカウント値(PC値)と終了アドレス保持レジスタ21−1〜21−Nの保持値との一致不一致の比較動作を開始し、比較器3−1〜3−Nは、最大値保持レジスタ31−1〜31−Nの保持値と測定値保持レジスタ41−1〜41−Nの保持値との大小関係の比較動作を開始する。 When “procedure T14”, that is, sig_en = “1”, the comparators 1-1 to 1-N hold the count values (PC values) of the PCs being executed and the start address holding registers 11-1 to 11-N. The comparator 2-1 to 2-N starts the count value (PC value) of the PC being executed and the hold values of the end address holding registers 21-1 to 21-N. The comparators 3-1 to 3-N start the comparison operation of the matching values of the maximum value holding registers 31-1 to 31-N and the holding values of the measurement value holding registers 41-1 to 41-N. The comparison operation of the magnitude relationship with is started.
「手順T15」比較器1−1〜1−Nは、実行中のPCのカウント値(PC値)と開始アドレス保持レジスタ11−1〜11−Nの保持値との一致を検出すると、時間測定装置4−1〜4−Nに起動指令を発行する。時間測定装置4−1〜4−Nは、比較器1−1〜1−Nから起動指令を受けると、直ちに時間測定を開始する。 [Procedure T15] When the comparators 1-1 to 1-N detect a match between the count value (PC value) of the PC being executed and the hold value of the start address holding register 11-1 to 11-N, the time measurement A start command is issued to the devices 4-1 to 4-N. The time measuring devices 4-1 to 4 -N start time measurement immediately upon receiving an activation command from the comparators 1-1 to 1 -N.
「手順T16」比較器2−1〜2−Nは、実行中のPCのカウント値(PC値)と終了アドレス保持レジスタ21−1〜21−Nの保持値との一致を検出すると、時間測定装置4−1〜4−Nに停止指令を発行する。時間測定装置4−1〜4−Nは、比較器2−1〜2−Nから停止指令を受けると、直ちに時間測定動作を停止し、測定結果(カウント値)を測定値保持レジスタ41−1〜41−Nに格納する。格納を終了すると、時間測定装置4−1〜4−Nはリセットされる。 [Procedure T16] When the comparators 2-1 to 2-N detect a match between the count value (PC value) of the PC being executed and the held value of the end address holding registers 21-1 to 21-N, the time measurement A stop command is issued to the devices 4-1 to 4-N. When the time measuring devices 4-1 to 4-N receive a stop command from the comparators 2-1 to 2-N, they immediately stop the time measuring operation, and the measurement result (count value) is stored in the measured value holding register 41-1. ~ 41-N. When the storage ends, the time measuring devices 4-1 to 4-N are reset.
「手順T17」比較器3−1〜3−Nでは、最大値保持レジスタ31−1〜31−Nの保持値と測定値保持レジスタ41−1〜41−Nの保持値との大小関係を比較し、測定値保持レジスタ41−1〜41−Nの保持値が最大値保持レジスタ31−1〜31−Nの保持値よりも大きいときは、測定値保持レジスタ41−1〜41−Nの保持値を最大値保持レジスタ31に転記して最大値を更新する一方、測定値保持レジスタ41−1〜41−Nの保持値が最大値保持レジスタ31−1〜31−Nの保持値よりも小さいとき、あるいは同じであるときは、最大値保持レジスタ31−1〜31−Nの保持値をそのままにしておく。
[Procedure T17] The comparators 3-1 to 3-N compare the magnitude relationship between the held values of the maximum value holding registers 31-1 to 31-N and the held values of the measured value holding registers 41-1 to 41-N. When the measured value holding registers 41-1 to 41-N are larger than the maximum value holding registers 31-1 to 31-N, the measured value holding registers 41-1 to 41-N are held. While the value is transferred to the maximum
「手順T18」比較器3−1〜3−Nでの上記した動作が終了した時点でプログラムが終了していない場合はプログラムが終了するまでの間、または、sig_en=“1”である場合はsig_en=“0”になるまでの間、「手順T15」〜「手順T17」の処理を繰り返す。その結果、繰り返し実行される各処理ブロックでの開始アドレス=終了アドレスの場合も含めた2点間の最大処理時間が最大値保持レジスタ31−1〜31−Nに保持される。 "Procedure T18" If the program is not finished when the above operations in the comparators 3-1 to 3-N are finished, until the program is finished, or when sig_en = "1" Until “sig_en” = “0”, the processes of “procedure T15” to “procedure T17” are repeated. As a result, the maximum processing time between two points including the case where the start address = end address in each processing block to be repeatedly executed is held in the maximum value holding registers 31-1 to 31-N.
このように、実施の形態2によれば、繰り返し実行される複数の処理ブロックがある場合に、各処理ブロックでの2点間の最大処理時間を、外部装置を介することなく自動的に測定することができるので、ソフトウェアの評価が容易に行えるようになる。 As described above, according to the second embodiment, when there are a plurality of processing blocks to be repeatedly executed, the maximum processing time between two points in each processing block is automatically measured without using an external device. This makes it easy to evaluate software.
実施の形態3.
図3は、この発明の実施の形態3によるソフトウェア評価装置の構成を示すブロック図である。図3において、2は、実行中のPCのカウント値(PC値)と開始アドレスとを比較するための比較器である。3は、ソフトウェアの処理時間測定結果と処理時間の最大値との比較を行うための比較器である。4は、ソフトウェアの処理時間の測定を行うための時間測定装置である。5は、アドレス/最大値ロード回路である。32は、現在の最大処理時間を保持するためのカレント最大値保持レジスタである。40は、処理時間測定結果を保持するための測定値保持レジスタである。50は、現在の処理時間測定終了アドレスを保持するためのカレント終了アドレス保持レジスタである。100は、処理時間測定を開始するN個のアドレスをそれぞれ保持するN個のレジスタからなる開始アドレス保持レジスタ群である。200は、処理時間測定を終了するN個のアドレスをそれぞれ保持するN個のレジスタからなる終了アドレス保持レジスタ群である。300は、N個の処理時間の最大値をそれぞれ保持するN個のレジスタからなる最大値保持レジスタ群である。sig_en1,sig_en2は、処理時間測定イネーブル信号であり、イネーブル時は“1”レベル、デイネーブル時は“0”レベルとなる2値のレベル信号である。
Embodiment 3 FIG.
FIG. 3 is a block diagram showing a configuration of a software evaluation apparatus according to Embodiment 3 of the present invention. In FIG. 3,
次に、以上のように構成されるソフトウェア評価装置の動作について説明する。「手順T31」まず、最大値保持レジスタ群300の各レジスタ値をゼロにする。また、時間測定装置4をリセットする。「手順T32」次に、開始アドレス保持レジスタ群100の各レジスタに処理時間の測定を開始するアドレスを設定し、また、終了アドレス保持レジスタ群200の各レジスタに処理時間の測定を終了するアドレスを設定する。「手順T33」そして、処理時間測定イネーブル信号sig_en1をイネーブルにする(sig_en1=“1”)。これによって、アドレス/最大値ロード回路5が動作を開始する。
Next, the operation of the software evaluation apparatus configured as described above will be described. [Procedure T31] First, each register value of the maximum value holding
「手順T34」すなわち、sig_en1=“1”になると、アドレス/最大値ロード回路5は、実行中のPCのカウント値(PC値)と開始アドレス保持レジスタ群100の各レジスタ値との一致不一致の比較動作を開始する。一致を検出すると、終了アドレス保持レジスタ群200と最大値保持レジスタ群300とから、検出した開始アドレス(PC値)に対応する終了アドレス及び最大値を読み出し、その読み出した終了アドレスをカレント終了アドレス保持レジスタ50に転記し、また読み出した最大値をカレント最大値保持レジスタ32に転記する。この転記処理を終了すると、アドレス/最大値ロード回路5は、処理時間測定イネーブル信号sig_en2をイネーブルにする(sig_en2=“1”)。これによって、比較器2,比較器3がそれぞれ比較動作を開始する。同時に、時間測定装置4がリセットされ、時間測定を開始する。
In “procedure T34”, that is, when sig_en1 = “1”, the address / maximum
「手順T35」すなわち、sig_en2=“1”になると、比較器2は、実行中のPCのカウント値(PC値)とカレント終了アドレス保持レジスタ50の保持値との一致不一致の比較動作を開始する。比較器2は、実行中のPCのカウント値(PC値)とカレント終了アドレス保持レジスタ50の保持値との一致を検出すると、時間測定装置4に停止指令を発行する。時間測定装置4は、比較器2から停止指令を受けると、直ちに時間測定動作を停止し、測定結果(カウント値)を測定値保持レジスタ40に格納する。格納を終了すると、時間測定装置4はリセットされる。
In “procedure T35”, that is, when sig_en2 = “1”, the
「手順T36」また、比較器3は、sig_en2=“1”になると、カレント最大値保持レジスタ32の保持値と測定値保持レジスタ40の保持値との大小関係の比較動作を開始する。比較器3は、測定値保持レジスタ40の保持値がカレント最大値保持レジスタ32の保持値よりも大きいときは、測定値保持レジスタ40の保持値をカレント最大値保持レジスタ32に転記して最大値を更新する一方、測定値保持レジスタ40の保持値がカレント最大値保持レジスタ32の保持値よりも小さいとき、あるいは同じであるときはカレント最大値保持レジスタ32の保持値をそのままにしておく。このとき、比較器3は、カレント最大値保持レジスタ32の保持値を更新するときは、その更新した最大値をロード元である最大値保持レジスタ群の対応するレジスタに転記して同様に更新する。
[Procedure T36] When sig_en2 = “1”, the comparator 3 starts a comparison operation of the magnitude relationship between the value held in the current maximum value holding register 32 and the value held in the measured
「手順T37」アドレス/最大値ロード回路5及び比較器2,3での上記した動作が終了した時点でプログラムが終了していない場合はプログラムが終了するまでの間、またはsig_en2=“1”である場合はsig_en2=“0”になるまでの間、「手順T34」〜「手順T36」の処理を繰り返す。その結果、繰り返し実行される各処理ブロックでの開始アドレス=終了アドレスの場合も含めた2点間の最大処理時間が最大値保持レジスタ群300の各レジスタに保持される。
“Procedure T37” If the program is not finished at the time when the above-described operation in the address / maximum
このように、実施の形態3によれば、繰り返し実行される複数の処理ブロックがある場合に、実施の形態2のように多数の比較器及び時間測定装置を用いなくとも、各処理ブロックでの2点間の最大処理時間を、外部装置を介することなく自動的に測定することができる。したがって、ハードウェアのコストを増大させることなく、ソフトウェアの評価が容易に行えるようになる。 As described above, according to the third embodiment, when there are a plurality of processing blocks to be repeatedly executed, the processing blocks in each processing block can be used without using many comparators and time measuring devices as in the second embodiment. The maximum processing time between two points can be automatically measured without using an external device. Therefore, software can be easily evaluated without increasing the hardware cost.
実施の形態4.
図4は、この発明の実施の形態4によるソフトウェア評価装置であるプロセッサの動作を説明するフローチャートである。図4において、プロセッサが実行する評価処理用プログラムは、メモリ上に搭載した評価対象プログラムを実行するメインルーチンにおいてプログラムカウンタが処理量測定終了アドレスを示したときに、プログラムカウンタが処理量測定開始アドレスを示したときから処理量測定終了アドレスを示すときまでに要したマシンサイクル数のカウント値をサイクル数格納レジスタに保持する手順と、プログラムカウンタが処理量測定終了アドレスを示したときに割り込みを発生して割り込みルーチンに移行する手順と、前記割り込みルーチンにおいて後述する処理を実行する手順と、前記割り込みルーチンでの処理を終了すると前記メインルーチンに戻って上記の処理を繰り返す手順とで構成されている。なお、サイクル数格納レジスタや最大サイクル数格納レジスタは、メモリに設けたレジスタとしての特定記憶領域、または、専用に設けたレジスタである。
FIG. 4 is a flowchart for explaining the operation of a processor which is a software evaluation apparatus according to
上記の割り込みルーチンでは、図4に示すように、プロセッサは、サイクル数格納レジスタに保持したカウント結果と最大サイクル数格納レジスタの値との大小関係を判断する(ステップST41)。その結果、カウント結果が最大サイクル数格納レジスタの値よりも大きい場合(ステップST41:Yes)は、カウント結果を最大サイクル数格納レジスタに格納し(ステップST42)、割り込みからの復帰命令を発行して(ステップST43)メインルーチンに移行する。一方、ステップST41の判断結果、カウント結果が最大サイクル数格納レジスタの値よりも小さい場合(ステップST41:No)は、直ちに割り込みからの復帰命令を発行して(ステップST43)メインルーチンに移行する。 In the above interrupt routine, as shown in FIG. 4, the processor determines the magnitude relationship between the count result held in the cycle number storage register and the value of the maximum cycle number storage register (step ST41). As a result, when the count result is larger than the value of the maximum cycle number storage register (step ST41: Yes), the count result is stored in the maximum cycle number storage register (step ST42), and a return instruction from the interrupt is issued. (Step ST43) The process proceeds to the main routine. On the other hand, if the result of determination in step ST41 is that the count result is smaller than the value of the maximum cycle number storage register (step ST41: No), a return instruction from the interrupt is immediately issued (step ST43), and the process proceeds to the main routine.
この割り込みルーチンは、評価対象プログラムが終了するまで繰り返し実行される。その結果、最大サイクル数格納レジスタには、処理時間であるマシンサイクル数の最大値が格納される。 This interrupt routine is repeatedly executed until the program to be evaluated ends. As a result, the maximum number of machine cycles, which is the processing time, is stored in the maximum cycle number storage register.
このように、実施の形態4によれば、比較器などのハードウェアを追加することなく、プロセッサの割り込み機能を用いてソフトウェアの処理時間の最大値を測定することができる。 As described above, according to the fourth embodiment, it is possible to measure the maximum value of the software processing time by using the interrupt function of the processor without adding hardware such as a comparator.
実施の形態5.
図5は、この発明の実施の形態5によるソフトウェア評価システムの構成を示すブロック図である。図5に示すように、実施の形態5によるソフトウェア評価システムは、LSI500と外部評価装置600とで構成される。LSI500は、実施の形態1にて説明したソフトウェア評価装置であり、制御部であるプロセッサコア部501と、このプロセッサコア部501の制御下に動作する時間測定装置502、測定値保持レジスタ503、比較器504及び最大値保持レジスタ505を備え、実施の形態1にて説明した手順で自動測定した処理時間の最大値が最大値保持レジスタ505に保持される。
FIG. 5 is a block diagram showing a configuration of a software evaluation system according to
LSI500は、外部評価装置600と通信する機能を備え、最大値保持レジスタ505に保持されている最大値を外部評価装置600に伝送できるようになっている。外部評価装置600は、LSI500から受け取った最大値を表示器に表示し、処理時間の推移等を観測することを可能にする。
The
このように、実施の形態5によれば、自動測定した処理時間の最大値を外部で観測することができる。なお、図5では、ソフトウェア評価装置(LSI500)として、実施の形態1に示した構成を示したが、実施の形態2〜4に示した構成も同様に適用できることは言うまでもない。 Thus, according to the fifth embodiment, the maximum value of the automatically measured processing time can be observed externally. In FIG. 5, the configuration shown in the first embodiment is shown as the software evaluation apparatus (LSI 500), but it is needless to say that the configurations shown in the second to fourth embodiments can be similarly applied.
以上のように、この発明にかかるソフトウェア評価装置及びシステムは、ソフトウェアの任意の開始アドレスと終了アドレスとで決定される区間の処理時間を外部の装置を介さずに測定するのに有用であり、特に開発等を行ったソフトウェアの処理時間を計測して評価するのに好適である。 As described above, the software evaluation device and system according to the present invention are useful for measuring the processing time of a section determined by an arbitrary start address and end address of software without using an external device, It is particularly suitable for measuring and evaluating the processing time of software that has been developed.
PC プログラムカウンタ
1,2,3 比較器
1−1〜1−N,2−1〜2−N,3−1〜3−N 比較器
4 時間測定装置
4−1〜4−N 時間測定装置
5 アドレス/最大値ロード回路
11 開始アドレス保持レジスタ
11−1〜11−N 開始アドレス保持レジスタ
21 終了アドレス保持レジスタ
21−1〜21−N 終了アドレス保持レジスタ
31 最大値保持レジスタ
31−1〜31−N 最大値保持レジスタ
32 カレント最大値保持レジスタ
40 測定値保持レジスタ
41 測定値保持レジスタ
41−1〜41−N 測定値保持レジスタ
50 カレント終了アドレス保持レジスタ
100 開始アドレス保持レジスタ群
200 終了アドレス保持レジスタ群
300 最大値保持レジスタ群
500 LSI(ソフトウェア評価装置)
501 プロセッサコア部(制御部)
502 時間測定装置
503 測定値保持レジスタ
504 比較器
505 最大値保持レジスタ
600 外部評価装置
501 Processor core unit (control unit)
502
Claims (5)
実行中のプログラムカウンタのカウント値と前記開始アドレスの値との一致不一致を比較してアドレス一致を検出することを前記プログラムが終了するまで繰り返す第1の比較手段と、
実行中の前記プログラムカウンタのカウント値と前記終了アドレスの値との一致不一致を比較してアドレス一致を検出することを前記プログラムが終了するまで繰り返す第2の比較手段と、
前記第1の比較手段がアドレス一致を検出したタイミングから前記第2の比較手段がアドレス一致を検出したタイミングまでの処理時間を測定することを前記プログラムが終了するまで繰り返す時間測定手段と、
処理時間の最大値を保持するための最大値保持レジスタと、
前記時間測定手段が測定した処理時間と前記最大値保持レジスタの保持値との大小関係を比較し、測定した前記処理時間が前記保持値よりも大きいときは当該測定した処理時間を新たな保持値として前記最大値保持レジスタに格納することを前記プログラムが終了するまで繰り返す最大値収集手段と、
を備えることを特徴とするソフトウェア評価装置。 A register that can arbitrarily set a start address and an end address of processing time measurement in the evaluation target program executed by the processor;
A first comparing means for repeating until the program ends by comparing the coincidence / mismatch between the count value of the program counter being executed and the value of the start address;
Second comparing means for repeating until the program ends by comparing address mismatch by comparing the count value of the program counter being executed and the value of the end address;
A time measuring unit that repeats measuring a processing time from a timing at which the first comparing unit detects an address match to a timing at which the second comparing unit detects an address match until the program ends;
A maximum value holding register for holding the maximum processing time, and
Compare the magnitude relationship between the processing time measured by the time measuring means and the holding value of the maximum value holding register, and if the measured processing time is larger than the holding value, the measured processing time is set as a new holding value. As a maximum value collecting means for repeating the storing in the maximum value holding register until the program ends,
A software evaluation apparatus comprising:
前記複数の処理ブロックそれぞれにおける処理時間測定の開始アドレスを任意に設定できる複数のレジスタからなる開始アドレス保持レジスタ群と、
前記複数の処理ブロックそれぞれにおける処理時間測定の終了アドレスを任意に設定できる複数のレジスタからなる終了アドレス保持レジスタ群と、
前記複数の処理ブロックそれぞれにおける処理時間の最大値を保持するための複数のレジスタからなる最大値保持レジスタ群と、
現在の最大処理時間を保持するためのカレント最大値保持レジスタと、
現在の終了アドレスを保持するためのカレント終了アドレス保持レジスタと、
前記開始アドレス保持レジスタ群の各レジスタ値の中で実行中のプログラムカウンタのカウント値と一致するレジスタ値を検出すると、その検出した開始アドレスに対応する終了アドレス及び最大値を前記終了アドレス保持レジスタ群及び前記最大値保持レジスタ群から読み出して前記カレント終了アドレス保持レジスタ及び前記カレント最大値保持レジスタにそれぞれ転記し、同時に起動指令を発行することを前記プログラムが終了するまで繰り返す制御手段と、
前記起動指令を受けるたびに、実行中のプログラムカウンタのカウント値と前記カレント終了アドレス保持レジスタの保持値とを比較してアドレス一致を検出する比較手段と、
前記起動指令を受けた時から前記検出器がアドレス一致を検出した時までの処理時間を測定する時間測定手段と、
前記起動指令を受けるたびに、前記時間測定手段が測定した処理時間と前記カレント最大値保持レジスタの保持値との大小関係を比較し、測定した前記処理時間が前記保持値よりも大きいときは当該測定した処理時間を新たな保持値として前記カレント最大値保持レジスタに格納するとともに、前記最大値保持レジスタ群の対応するレジスタに転記する最大値収集手段と、
を備えることを特徴とするソフトウェア評価装置。 When the evaluation target program executed by the processor consists of multiple processing blocks,
A start address holding register group consisting of a plurality of registers capable of arbitrarily setting a start address of processing time measurement in each of the plurality of processing blocks;
An end address holding register group composed of a plurality of registers that can arbitrarily set an end address of processing time measurement in each of the plurality of processing blocks;
A maximum value holding register group composed of a plurality of registers for holding the maximum value of the processing time in each of the plurality of processing blocks;
A current maximum value holding register for holding the current maximum processing time;
A current end address holding register for holding the current end address;
When a register value matching the count value of the program counter being executed is detected among the register values of the start address holding register group, the end address and maximum value corresponding to the detected start address are set to the end address holding register group And a control means that reads from the maximum value holding register group and transcribes the current end address holding register and the current maximum value holding register respectively, and simultaneously issues a start command until the program ends,
Comparison means for detecting an address match by comparing the count value of the program counter being executed and the holding value of the current end address holding register each time the activation command is received;
Time measuring means for measuring a processing time from when the activation command is received to when the detector detects an address match;
Each time the activation command is received, the processing time measured by the time measuring means is compared with the holding value of the current maximum value holding register, and when the measured processing time is greater than the holding value, Storing the measured processing time in the current maximum value holding register as a new holding value and transferring the maximum value collecting means to the corresponding register of the maximum value holding register group;
A software evaluation apparatus comprising:
プログラムカウンタが処理量測定終了アドレスを示したときに割り込みを発生して割り込みルーチンに移行する手順と、
前記割り込みルーチンにおいて、前記サイクル数格納レジスタに保持したカウント結果と最大サイクル数格納レジスタの値との大小関係を判断し、カウント結果が最大サイクル数格納レジスタの値よりも大きい場合は当該カウント結果を当該最大サイクル数格納レジスタに格納して前記メインルーチンに戻り、一方、前記カウント結果が前記最大サイクル数格納レジスタの値よりも大きくない場合は当該最大サイクル数格納レジスタの値を更新せずに前記メインルーチンに戻る手順と、
前記3つの手順を前記評価対象プログラムが終了するまで繰り返す手順と、
を実行するプロセッサで構成されることを特徴とするソフトウェア評価装置。 In the main routine that executes the program to be evaluated installed in the memory, when the program counter indicates the throughput measurement end address, and when the program counter indicates the throughput measurement end address from when the program counter indicates the throughput measurement start address Procedure to keep the count value of the number of machine cycles required until the cycle number storage register,
A procedure for generating an interrupt and transferring to an interrupt routine when the program counter indicates the processing amount measurement end address;
In the interrupt routine, the magnitude relationship between the count result held in the cycle number storage register and the value of the maximum cycle number storage register is determined. If the count result is larger than the value of the maximum cycle number storage register, the count result is Store in the maximum cycle number storage register and return to the main routine. On the other hand, if the count result is not larger than the value of the maximum cycle number storage register, the value of the maximum cycle number storage register is not updated. The procedure to return to the main routine,
A procedure for repeating the three steps until the evaluation target program ends;
A software evaluation apparatus comprising a processor that executes
前記ソフトウェア評価装置が伝送する最大処理時間を表示手段に外部から視認可能に表示する外部評価装置、
を備えることを特徴とするソフトウェア評価装置システム。
A means for transmitting the measured maximum processing time to the software evaluation device according to any one of claims 1 to 4 is provided,
An external evaluation device for displaying the maximum processing time transmitted by the software evaluation device on the display means so as to be visible from the outside;
A software evaluation apparatus system comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005109081A JP2006293427A (en) | 2005-04-05 | 2005-04-05 | Software evaluation device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005109081A JP2006293427A (en) | 2005-04-05 | 2005-04-05 | Software evaluation device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006293427A true JP2006293427A (en) | 2006-10-26 |
Family
ID=37413976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005109081A Pending JP2006293427A (en) | 2005-04-05 | 2005-04-05 | Software evaluation device and system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006293427A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010160716A (en) * | 2009-01-09 | 2010-07-22 | Toyota Motor Corp | Verification device |
JP2012133752A (en) * | 2010-11-29 | 2012-07-12 | Denso Corp | Microcomputer |
-
2005
- 2005-04-05 JP JP2005109081A patent/JP2006293427A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010160716A (en) * | 2009-01-09 | 2010-07-22 | Toyota Motor Corp | Verification device |
JP2012133752A (en) * | 2010-11-29 | 2012-07-12 | Denso Corp | Microcomputer |
US8700956B2 (en) | 2010-11-29 | 2014-04-15 | Denso Corporation | Microcomputer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080229166A1 (en) | Accelerating Test, Debug and Failure Analysis of a Multiprocessor Device | |
US20100205399A1 (en) | Performance counter for microcode instruction execution | |
JP3553946B2 (en) | Execution of data processing instructions | |
US11709756B2 (en) | Dynamic distributed tracing instrumentation in a microservice architecture | |
JP2006293427A (en) | Software evaluation device and system | |
US11422916B2 (en) | Usage amount monitoring method and monitoring unit of electronic control unit for vehicle | |
Maeda et al. | Automotive IC on-line test techniques and the application of deterministic ATPG-based runtime test | |
US20200257545A1 (en) | Simulation device, simulation method, and computer readable medium | |
US8661166B2 (en) | DFX software debug feature for IO and other non-memory typed transactions | |
JP2004038350A (en) | Acceleration testing process for computer | |
JP2009217385A (en) | Processor and multiprocessor | |
JP2005222446A (en) | On-board debugging apparatus and semiconductor circuit apparatus | |
JP2022520914A (en) | Testing read-only memory using a memory-embedded self-test controller | |
US7523297B1 (en) | Shadow scan decoder | |
US20240160446A1 (en) | Predicting a Vector Length Associated with a Configuration Instruction | |
JPH1063516A (en) | Method and device for bottleneck detection | |
US10120737B2 (en) | Apparatus for detecting bugs in logic-based processing devices | |
JP2810342B2 (en) | IC test equipment | |
JP3695196B2 (en) | Data processing device | |
US20120166776A1 (en) | Method, system, and computer program for analyzing program | |
JP2000122898A (en) | Method and device for simulation | |
JP6365043B2 (en) | Observation circuit | |
JP2006293725A (en) | Debugger for lsi system | |
JPH1021157A (en) | Device and method for verifying bus bridge model | |
JP2006268612A (en) | Processing time measuring system and processing time measuring program |