JPH0245841A - Processing time measuring device - Google Patents

Processing time measuring device

Info

Publication number
JPH0245841A
JPH0245841A JP63197454A JP19745488A JPH0245841A JP H0245841 A JPH0245841 A JP H0245841A JP 63197454 A JP63197454 A JP 63197454A JP 19745488 A JP19745488 A JP 19745488A JP H0245841 A JPH0245841 A JP H0245841A
Authority
JP
Japan
Prior art keywords
cpu
processing
interrupt
interruption
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
Application number
JP63197454A
Other languages
Japanese (ja)
Inventor
Akito Shibata
明人 柴田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63197454A priority Critical patent/JPH0245841A/en
Publication of JPH0245841A publication Critical patent/JPH0245841A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Unknown Time Intervals (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To exactly obtain a time to be measured by interrupting the measurement processing of a timer during interruption processing when interruption is executed in high order processing. CONSTITUTION:While an interruption detecting signal to be inputted to an AND gate 5 is a high level, a timer 6 measures the processing time of respective equipments to use a CPU by measuring the processing time from the starting address to ending address of the CPU which is not shown in a figure. Now, explanation is given concerning a case that the information of 3 bytes are saved to a stack area. A shift register 12 and an AND gate 14 are provided in order to detect that the stack area is distinguished from a sub routine call or a data save and obtains the activation of the interruption. When the interruption is generated, an up/down counter 16 executes count-up by the output signal of an AND gate 15. While a counted value is not '0', the measurement of the timer 6 is temporarily interrupted.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、CPU(中央処理装置)を用いた各種機器の
処理時間を計測する処理時間計測装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a processing time measuring device that measures the processing time of various devices using a CPU (central processing unit).

従来の技術 第3図は、従来の処理時間計測装置を示す。Conventional technology FIG. 3 shows a conventional processing time measuring device.

第3図において、1は、CPUバスに同期したクロック
によりCPUアドレスバス上のCPUの実行アドレスを
ラッチするラノP12は、ラノy−1からのCPUの実
行アドレスと、計測を行うCPUの処理の開始アドレス
と比較し、一致したときに一致信号を出力するコンパレ
ータ、3は、ラッチ1からのCPUの実行アドレスと、
計測を行うCPUの処理の終了アドレスと比較し、一致
したときに一致信号を出力するコンパレータである。
In Figure 3, 1 latches the CPU execution address on the CPU address bus using a clock synchronized with the CPU bus.Lano P12 latches the CPU execution address from Lano Y-1 and the CPU processing that performs measurement. Comparator 3 compares with the start address and outputs a match signal when they match; 3 is the CPU execution address from latch 1;
This is a comparator that compares the processing end address of the CPU that performs measurement and outputs a match signal when they match.

4は、コンパレータ2からの一致信号が入力したときか
らコンパレータ3からの一致信号が入力するまでの間ハ
イレベルの信号を出力する11.8フリップフロップ、
6は、RSフリップフロップ4からの信号がハイレベル
の間の時間を計測するタイマであり、タイマ6は、計測
開始命令によりクリアされる。
4 is an 11.8 flip-flop that outputs a high-level signal from when the match signal from comparator 2 is input until when the match signal from comparator 3 is input;
6 is a timer that measures the time while the signal from the RS flip-flop 4 is at a high level, and the timer 6 is cleared by a measurement start command.

上記従来例では、タイマ6がCPUの開始アドレスから
終了アドレスまでの時間を計測することにより、CPU
を用いた各種機器の処理時間を計測する。
In the above conventional example, the timer 6 measures the time from the start address of the CPU to the end address of the CPU.
Measure the processing time of various devices using

発明が解決しようとする課題 しかしながら、上記従来の処理時間計測装置では、CP
Uの開始アドレスから終了アドレスまでの時間を単に計
測するので、CPUに上位の割)込みが発生してCPU
がその処理を実行した場合には、計測を行う処理と割り
込み処理の合計時間を計測し、したがって、計測を行う
処理のみの時間を計測することができないという問題点
がある。
Problems to be Solved by the Invention However, in the above conventional processing time measuring device, the CP
Since the time from the start address to the end address of U is simply measured, an upper-level interrupt occurs to the CPU and the CPU
When the CPU executes the processing, there is a problem in that the total time of the measurement processing and the interrupt processing is measured, and therefore it is not possible to measure the time only for the measurement processing.

尚、上記問題点を解決するために、計測を行う処理の間
、上位の割り込みをハードウェア又はソフトウェアによ
り禁止する方法も知られているが、CPUを搭載した機
器によっては、処理中に他の処理の割り込みが発生しな
くなると、割り込みの発生要因が故障であると判定する
ものがあり、この場合には計測を行う処理のみの時間を
計測する装置とは言い難い。
In order to solve the above problem, there is a known method of disabling upper-level interrupts using hardware or software during measurement processing, but depending on the device equipped with the CPU, other interrupts may be disabled during processing. If a processing interrupt no longer occurs, it may be determined that the cause of the interrupt is a failure, and in this case, it is difficult to say that the device measures the time of only the processing to be measured.

本発明は上記問題点に鑑み、計測を行う処理の時間のみ
を計測することができる処理時間計測装置を提供するこ
とを目的とする。
SUMMARY OF THE INVENTION In view of the above-mentioned problems, an object of the present invention is to provide a processing time measuring device that can measure only the processing time to be measured.

課題を解決するだめの手段 本発明は上記目的を達成するだめに、上位の処理の割り
込みが発生したか否かを検出し、発生した場合に割り込
み処理の間、計測を行う処理の計測を中断させるように
したものである。
Means for Solving the Problem In order to achieve the above object, the present invention detects whether or not an interrupt occurs in a higher-level process, and if an interrupt occurs, interrupts the measurement process during the interrupt process. It was designed so that

作    用 本発明は上記構成により、上位の処理の割り込みが発生
した場合には計測が中断し、割り込んだ処理が終了した
場合には計測が再開するので、計測を行う処理の時間の
みを計測することができる。
Effect: With the above-described configuration, the present invention interrupts measurement when an interrupt occurs in a higher-level process, and resumes measurement when the interrupting process ends, so that only the time of the process to be measured is measured. be able to.

実施例 以下、図面を参照して本発明の詳細な説明する。第1図
は、本発明に係る処理時間計測装置の一実施例を示すブ
ロック図、第2図は、第1図の処理時間計測装置の上位
側シ込み検出回路を示すブロック図である。
EXAMPLES Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a processing time measuring device according to the present invention, and FIG. 2 is a block diagram showing an upper side shrinkage detection circuit of the processing time measuring device of FIG.

第1図において、1は、CPUパスに同期したクロック
によりCPUアドレスバス上のCPUの実行アドレスを
ラッチするラッチ、2は、ラッy′″1からのCPUの
実行アドレスと、計測を行うCPUの処理の開始アドレ
スと比較し、一致したときに一致信号を出力するコンパ
レータ、3は、ラッテlからのCPUの実行アドレスと
、計測を行うCPUの処理の終了アドレスと比較し、一
致したときに一致信号ヲ出力スルコンパレー夕、4は、
コンパレータ2からの一致信号が入力したときからコン
パレータ3からの一致信号が入力するまでの間ハイレベ
ルの信号を出力するRSフリップフロップである。
In Figure 1, 1 is a latch that latches the CPU execution address on the CPU address bus using a clock synchronized with the CPU path, and 2 is a latch that latches the CPU execution address from latch y'''1 and the CPU that performs measurement. Comparator 3 compares the processing start address and outputs a match signal when they match, compares the CPU execution address from Latte l with the processing end address of the CPU that performs measurement, and outputs a match signal when they match. The signal output comparator, 4, is
This is an RS flip-flop that outputs a high level signal from the time when the match signal from comparator 2 is input until the time when the match signal from comparator 3 is input.

5は、R8フリップフロップ4の出力信号と、第2図に
示す上位割り込み検出回路の出力信号の論理積信号を出
力するaゲート、6は、M■ゲート5の出力信号がハイ
レベルの間の時間を計測するタイマであり、タイマ6は
、計測開始命令によりクリアされる。
5 is an a gate that outputs an AND signal of the output signal of the R8 flip-flop 4 and the output signal of the upper interrupt detection circuit shown in FIG. This is a timer that measures time, and the timer 6 is cleared by a measurement start command.

第2図において、7は、CPUパスに同期したクロック
によりCPUアドレスバス上のCPUの実行アドレスの
今回の値をラッテするラッチ、8は、CPUパスに同期
したクロyりによりCPUアドレスバス上のCPUの実
行アドレスの前回の値をラッチするラッチである。
In Figure 2, 7 is a latch that latches the current value of the CPU execution address on the CPU address bus using a clock synchronized with the CPU path, and 8 is a latch that latches the current value of the CPU execution address on the CPU address bus using a clock synchronized with the CPU path. This is a latch that latches the previous value of the CPU execution address.

9は、ラッテ7.8からのそれぞれの今回の値(A)、
前回の値(B)を比較し、その差(A−B)が「−1」
のときと「+1」のときにそれぞれその検出信号を出力
するコンパレータ、 10は、CPUアドレスバス上の
CPUの実行アドレスがCPUのRAM(不図示)のス
タック領域を示すことを検出するデコーダ、11は、デ
コーダ10からの検出信号を1サイクル遅延するラッチ
である。
9 is each current value (A) from Latte 7.8,
Compare the previous value (B) and the difference (A-B) is "-1"
10 is a decoder that detects that the execution address of the CPU on the CPU address bus indicates a stack area of the CPU's RAM (not shown); 11; is a latch that delays the detection signal from the decoder 10 by one cycle.

12 、14はそれぞれ、コンパレータ9による差(A
−B)が「−1」のときの検出信号によシ、今回の値が
スタックへの退避方向であることを検出するシフトレジ
スタ、M■ゲートであり、13゜15はそれぞれ、コン
パレータ9による差(A−B)が1+1」のときの検出
信号により、今回の値がスタyりからの復帰方向である
ことを検出するシフトレジスタ、MΦゲートであり、シ
フトレジスタ12 、13はそれぞれ、ラノ−1llの
Q端子の出力信号によりクリアされる。
12 and 14 are the differences (A
-B) is "-1" by the detection signal and detects that the current value is in the direction of saving to the stack. This is a shift register and MΦ gate that detects that the current value is in the direction of recovery from a stall based on a detection signal when the difference (A-B) is 1+1. It is cleared by the output signal of the Q terminal of -1ll.

16は、シフトレジスタ12 、13及び、心のゲート
14 、15の検出信号によシ、割り込みの開始及び終
了を検出するだめのアップダウンカウンタであり、アッ
プダウンカウンタ16 は、前述した計測開始命令によ
りクリアされる。17は、アップダウンカウンタ16の
出力信号によシ割り込みの間ロウレベルの信号を出力す
るNORゲートである。
16 is an up/down counter for detecting the start and end of an interrupt according to the detection signals of the shift registers 12, 13 and the heart gates 14, 15; Cleared by A NOR gate 17 outputs a low level signal during an interrupt based on the output signal of the up/down counter 16.

次に、上記実施例の動作を説明する。Next, the operation of the above embodiment will be explained.

第1図において、タイマ6は、アンドゲート5に入力す
る割り込み検出信号がハイレベルの間、CPUの開始ア
ドレスから終了アドレスまでの時間を計測することによ
り、CPUを用いた各種機器の処理時間を計測する。
In FIG. 1, the timer 6 measures the time from the start address of the CPU to the end address while the interrupt detection signal input to the AND gate 5 is at a high level, thereby increasing the processing time of various devices using the CPU. measure.

この場合、第2図において、上位の割り込みが発生する
と、CPUが票のプログラムカウンタやステータスレジ
スタをスタック領域に退避させるので、スタック領域を
連続したサイクルで占有するアドレス数は、サブルーチ
ンコールや汎用レジスタのプツシ−によりスタック領域
を連続したサイクルで占有するアドレス数より少なくと
もステータスレジスタの数より大きい。
In this case, in Figure 2, when an upper-level interrupt occurs, the CPU saves the program counter and status registers to the stack area, so the number of addresses occupying the stack area in consecutive cycles is limited to subroutine calls and general-purpose registers. The number of addresses occupying the stack area in successive cycles due to the push is at least greater than the number of status registers.

ここで、3バイトの情報がスタック領域に退避する場合
について説明する。スタック領域がサブルーチンコール
やデータ退避と区別して割り込みの起動であることを検
出するためには、連続した3つのアドレスが連続してア
クセスされたことを検出するために、CPUアドレスの
今回の値と前回の値の差が「−1」である状態が2回連
続したことを検出すれば、割り込みが発生したことを検
出することができる。
Here, a case will be described in which 3 bytes of information are saved in the stack area. In order to detect that the stack area is an interrupt activation, distinguishing it from a subroutine call or data save, the current value of the CPU address and If it is detected that the difference between the previous values is "-1" twice in a row, it is possible to detect that an interrupt has occurred.

したがって、シフトレジスタ12は、2ピツトで構成す
ることができ、2つの入力信号のMのゲート14により
割り込みを検出することができる。
Therefore, the shift register 12 can be configured with two pits, and an interrupt can be detected by the M gate 14 of two input signals.

また、割り込みからの復帰は、2ビツトのシフトレジス
タ13 と2つの入力信号のNのゲート15により検出
することができる。
Further, return from an interrupt can be detected by a 2-bit shift register 13 and an N gate 15 of two input signals.

アップダウンカウンタ16は、計測開始命令によりクリ
アされた後、割り込みが発生すると、アンドゲート14
の出力信号によりカウントアツプし、M■ゲート15の
出力信号によりカクソトダウンして、カウント値が「0
」でない間、タイマ6の計測を一時中断させる。。
After the up/down counter 16 is cleared by the measurement start command, when an interrupt occurs, the AND gate 14 is cleared.
The count is increased by the output signal of the M gate 15, and the count is decreased by the output signal of the M gate 15, and the count value becomes "0".
”, the measurement by timer 6 is temporarily suspended. .

尚、アップダウンカウンタ16のカウント値は、割り込
みが多重で発生した場合の段数を示す。
Note that the count value of the up/down counter 16 indicates the number of stages when multiple interrupts occur.

また、CPUのスタック領域に対する連続サイクルのア
ドレス数が3バイトでない場合には、シフトレジスタ1
2 、13のビット数とM山ゲート14゜15の入力信
号数を変更すればよく、更に、アップダウンカウンタ1
6に必要な最大カウント値は、割り込みの段数によって
選択すればよい。
In addition, if the number of addresses in consecutive cycles to the stack area of the CPU is not 3 bytes, the shift register 1
It is only necessary to change the number of bits of 2 and 13 and the number of input signals of the M-mount gate 14 and 15.
The maximum count value required for 6 may be selected depending on the number of interrupt stages.

発明の詳細 な説明したように、本発明は、上位の処理の割り込みが
発生したか否かを検出し、発生した場合に割り込み処理
の間、計測を行う処理の実行を中断させるようにしたの
で、計測を行う処理の時間のみを計測することができる
As described in detail, the present invention detects whether or not an interrupt occurs in a higher-level process, and if an interrupt occurs, interrupts the execution of the process that performs measurement during the interrupt process. , only the processing time to be measured can be measured.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明に係る処理時間計測装置の一実施例を
示すブロック図、第2図は、第1図の処理時間計測装置
の上位割り込み検出回路を示すブロック図、第3図は、
従来の処理時間計測装置を示すブロック図である。 1 、7 、8 、11 ・・ラッチ、2,3.9・・
・コンパレータ、4・・RSフリップフロップ、5 、
14゜15  ・に化ゲート、6・・・タイマ、1o・
・・デコーダ、12 、13・・シフトレジスタ、16
・・アップダウンカウンタ、17− NORゲート。
FIG. 1 is a block diagram showing an embodiment of a processing time measuring device according to the present invention, FIG. 2 is a block diagram showing an upper interrupt detection circuit of the processing time measuring device of FIG. 1, and FIG.
FIG. 1 is a block diagram showing a conventional processing time measuring device. 1, 7, 8, 11...Latch, 2, 3.9...
・Comparator, 4...RS flip-flop, 5,
14゜15 ・Niversion gate, 6...Timer, 1o・
...Decoder, 12, 13...Shift register, 16
...up/down counter, 17-NOR gate.

Claims (2)

【特許請求の範囲】[Claims] (1)計測を行う処理の開始アドレスと現在の実行アド
レスを比較し、一致した場合に一致信号を出力する第1
の比較手段と、計測を行う処理の終了アドレスと現在の
実行アドレスを比較し、一致した場合に一致信号を出力
する第2の比較手段と、前記第1の比較手段からの一致
信号から前記第2の比較手段からの一致信号までの時間
を計測する手段と、上位の処理の割り込みが発生したか
否かを検出し、発生した場合に割り込み処理の間、前記
計測手段の計測を中断させる割り込み検出手段とを有す
る処理時間計測装置。
(1) The first step which compares the start address of the process to be measured and the current execution address and outputs a match signal if they match.
a second comparing means that compares the end address of the process to be measured and the current execution address and outputs a match signal if they match; Means for measuring the time until the match signal from the comparing means of No. 2, and an interrupt for detecting whether or not an interrupt of a higher-level process has occurred, and interrupting the measurement of the measuring means during the interrupt processing if an interrupt occurs. A processing time measuring device having a detection means.
(2)割り込み検出手段は、スタック領域の所定の連続
した数のアドレスがアクセスされたか否かにより、上位
の処理の割り込みが発生したか否かを検出することを特
徴とする請求項1記載の処理時間計測装置。
(2) The interrupt detection means detects whether or not an interrupt of a higher-level process has occurred based on whether or not a predetermined number of consecutive addresses in the stack area have been accessed. Processing time measuring device.
JP63197454A 1988-08-08 1988-08-08 Processing time measuring device Pending JPH0245841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63197454A JPH0245841A (en) 1988-08-08 1988-08-08 Processing time measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63197454A JPH0245841A (en) 1988-08-08 1988-08-08 Processing time measuring device

Publications (1)

Publication Number Publication Date
JPH0245841A true JPH0245841A (en) 1990-02-15

Family

ID=16374779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63197454A Pending JPH0245841A (en) 1988-08-08 1988-08-08 Processing time measuring device

Country Status (1)

Country Link
JP (1) JPH0245841A (en)

Similar Documents

Publication Publication Date Title
US4956807A (en) Watchdog timer
JPH0528063A (en) Microcomputer
JPH02283120A (en) Noise eliminator
JPH0245841A (en) Processing time measuring device
JPH0284812A (en) Duty factor discrimination circuit
JPH0498540A (en) Processor load monitoring system
JPH04142635A (en) Abnormal operation detecting device for processor
JPH0297115A (en) Timer test system
JPS5855535B2 (en) Multi-computer device for vehicles
JP2598547Y2 (en) Pattern generator for semiconductor test equipment
JP3090069B2 (en) Control device
JPH04106637A (en) Stall detection circuit
JPS61193224A (en) Sequence fault detector for polyphase clock
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPH0581052A (en) Microprocessor runaway check circuit
JPH02234240A (en) Information processor
JPH08139576A (en) Contact point noise elimination circuit
JPH05204715A (en) Watchdog timer circuit
JPS62216048A (en) Runaway detecting system for processor
JPH05108375A (en) Data processor
JPS62232043A (en) Error detecting circuit
JPS60243751A (en) Supervisory circuit of incorrect interruption in computer
JPS62102340A (en) Coincidence detection circuit
JPH038005A (en) Timer control system
JPH0277854A (en) Resetting system for microprocessor