JPH01177647A - Information processor - Google Patents

Information processor

Info

Publication number
JPH01177647A
JPH01177647A JP63002314A JP231488A JPH01177647A JP H01177647 A JPH01177647 A JP H01177647A JP 63002314 A JP63002314 A JP 63002314A JP 231488 A JP231488 A JP 231488A JP H01177647 A JPH01177647 A JP H01177647A
Authority
JP
Japan
Prior art keywords
arithmetic processing
command
instruction
circuit
program
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
JP63002314A
Other languages
Japanese (ja)
Inventor
Shoshiro Ono
大野 正志郎
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63002314A priority Critical patent/JPH01177647A/en
Publication of JPH01177647A publication Critical patent/JPH01177647A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily investigate the number of times of appearing of a certain command, etc., by holding the execution states of a certain command with a performance measuring mode in designated number of clocks, and comparing also times when a program flows in the case of the performance measuring mode and the case of the mode except for the performance measuring mode. CONSTITUTION:In the middle of executing the program, the command code of the command transferred from a command prefetching circuit 5 through a signal line 10 to an arithmetic processing circuit 4 is sent through a signal line 8 to a comparator 11, and the code is compared with the command code of a command code register 2 sent through a signal line 7. At the time of a coincidence, a coincidence signal is outputted from the comparator 11, and an arithmetic processing suppressing signal is outputted from a suppressing signal generating circuit 12 only in a designated number (n) of clocks. The arithmetic processing suppressing signal is outputted to the arithmetic processing circuit 4 and command prefetching circuit 5. Thus, a processing time T0 of the program can be known, and since a processing time T1 when the program is made to flow in a condition except the performance measuring mode is known beforehand, the number of times of appearing of the command can be obtained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は演算処理手段を有する情報処理装置に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to an information processing device having an arithmetic processing means.

〔従来の技術〕[Conventional technology]

プログラムの高速化を行なうなどのために、ある命令が
そのプログラムにどの程度影響を与えているかなど知る
ことが必要である。従来、そのプログラムにある命令が
どの程度の影響を与えているか、たとえば、その命令の
出現回数を調べ゛ることなどは、プログラムの解析を行
なフたり、また、ある命令を実行したら外部へ信号を出
力する回路を特別に設け、その信号を外部でカウントす
るなどをして行なわれてきた。
In order to speed up a program, it is necessary to know how much influence a certain instruction has on the program. Traditionally, it has been possible to analyze the program to find out how much influence a given instruction has on a program, for example, by checking the number of times the instruction appears, or when an instruction is executed, This has been done by providing a special circuit to output the signal and counting the signal externally.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したようなプログラムの解析により命令数を調べる
ことは、解析するプログラムによっては、大変困難な場
合があり、また、外部へ信号を出力する回路を特別に設
けることは、ハードウェア量を多く必要とするという欠
点がある。
Determining the number of instructions by analyzing a program as described above may be very difficult depending on the program being analyzed, and providing a special circuit to output signals to the outside requires a large amount of hardware. There is a drawback that.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の情報処理装置は、命令コードを保持する命令コ
ード保持手段と、情報処理装置が性能測定モードである
ことを指示するモード指示手段と、前記モード指示手段
により、性能測定モードであることを指示された場合、
前記命令コード保持手段により指示された命令が情報処
理装置の演算処理手段により処理される時、指定された
クロック数だけ前記演算処理手段を同じ状態に保持する
演算処理抑止手段を有している。
The information processing apparatus of the present invention includes an instruction code holding means for holding an instruction code, a mode instruction means for indicating that the information processing apparatus is in the performance measurement mode, and a mode instruction means for indicating that the information processing apparatus is in the performance measurement mode. If instructed,
When the instruction instructed by the instruction code holding means is processed by the arithmetic processing means of the information processing device, the information processing apparatus includes an arithmetic processing inhibiting means for holding the arithmetic processing means in the same state for a specified number of clocks.

〔作  用〕[For production]

命令コード保持手段に保持されている命令の出現回数を
m、クロックサイクル時間をCt、指定されたクロック
数をnとすると、演算処理手段が同じ状態を保持する時
間は全体として Ct −n −m である。
Assuming that the number of occurrences of an instruction held in the instruction code holding means is m, the clock cycle time is Ct, and the specified number of clocks is n, the total time for the arithmetic processing means to maintain the same state is Ct −n −m It is.

一方、性能測定モードでない状態でプログラムを流した
時間T1は予めわかっており、また性能測定モードでプ
ログラムを流した時間T0を測定すると、 T6 =T+ +ct −n−m が成立する。
On the other hand, the time T1 during which the program was run in a state other than the performance measurement mode is known in advance, and when the time T0 during which the program was run in the performance measurement mode is measured, T6 = T+ +ct - nm holds true.

したがって、命令の出現回数mは m−(T、)  TI)/(Ct −n)  −(1)
となる。       :、。
Therefore, the number of occurrences m of the instruction is m-(T,) TI)/(Ct-n)-(1)
becomes. :,.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の情報処理装置の一実施例の要部のブロ
ック図である。
FIG. 1 is a block diagram of essential parts of an embodiment of an information processing apparatus of the present invention.

モードレジスタ1は、情報処理装置が性能測定モードで
ある場合、 ”1″がセットされる。命令コードレジス
タ2は、演算処理状態を指定されたクロックサイクル数
n保持したい命令の命令コードを保持する。命令先取り
回路5は命令を先取りして、演算処理回路4に演算用デ
ータ、制御情報を転送する。演算処理抑止回路3は比較
回路11とサプレス信号発生回路12とアントゲート1
3で構成され、モードレジスタ1により性能測定モード
が指示されていて、かつ、命令コードレジスタ2に保持
されている命令コードと命令先取り回路5より送られて
くる命令コードを比較回路11で比較し、同じだった場
合、演算処理回路4および命令先取り回路5内のレジス
タを指定されたクロック数nだけ同じ状態にする演算処
理抑止信号を出力する。
Mode register 1 is set to "1" when the information processing device is in performance measurement mode. The instruction code register 2 holds the instruction code of an instruction whose arithmetic processing state is to be maintained for a specified number of clock cycles n. The instruction prefetch circuit 5 prefetches instructions and transfers calculation data and control information to the arithmetic processing circuit 4. The arithmetic processing suppression circuit 3 includes a comparison circuit 11, a suppress signal generation circuit 12, and an ant gate 1.
The comparison circuit 11 compares the instruction code held in the instruction code register 2 and the instruction code sent from the instruction prefetch circuit 5, in which the performance measurement mode is instructed by the mode register 1. , if they are the same, outputs an arithmetic processing inhibit signal that causes the registers in the arithmetic processing circuit 4 and the instruction prefetching circuit 5 to be in the same state for a specified number of clocks n.

次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

モードレジスタ1に”1”をセットして情報処理装置を
性能測定モードにするとともに、命令コードレジスタ2
に出現回数を調べたい命令の命令コードを設定し、プロ
グラムを流す。このとき、タイマーによりプログラムの
処理時間を計測する。プログラムの実行中、命令先取り
回路5から信号線10により演算処理回路4に転送され
る命令の命令コードが信号線8により比較回路11に送
られ、信号線7で送られてくる命令コードレジスタ2の
命令コードと比較される。そして、一致すると、比較回
路11から一致信号が出力されてサプレス信号発生回路
12から演算処理抑止信号が指定されたクロック数nだ
け出力される。この演算処理抑止信号はモードレジスタ
1の出力信号線6が”1”であるのでアンドゲート13
を通過し、信号線9により演算処理回路4と命令先取り
回路5に出力される。これにより、演算処理回路4と命
令光′取り回路5は演算処理回路4内のレジスタ等の更
新をすべて抑止する。これは、命令コートレジスタ2に
セットされている命令コートの命令が命令先取り回路5
から演算処理回路4に転送される毎に繰り返される。そ
して、プログラム全体の処理が終了すると、タイマーを
停止させ、プログラムの処理時間Toを知る。性能測定
モードでない状態でプログラムを流したときの処理時間
T1は予めわかっているので、命令コードレジスタ2に
セットされている命令の出現回数mは(1)式にT6.
TI、Ct、nの値を代入することにより求まる。
Set "1" to mode register 1 to put the information processing device into performance measurement mode, and set instruction code register 2 to "1".
Set the instruction code of the instruction for which you want to check the number of occurrences, and run the program. At this time, a timer measures the processing time of the program. During program execution, the instruction code of the instruction transferred from the instruction prefetch circuit 5 to the arithmetic processing circuit 4 via the signal line 10 is sent to the comparator circuit 11 via the signal line 8, and the instruction code is sent via the signal line 7 to the instruction code register 2. is compared with the instruction code of If they match, the comparison circuit 11 outputs a match signal, and the suppress signal generation circuit 12 outputs an arithmetic processing suppression signal for the specified number of clocks n. Since the output signal line 6 of the mode register 1 is "1", this arithmetic processing inhibit signal is sent to the AND gate 13.
The signal passes through the signal line 9 and is output to the arithmetic processing circuit 4 and the instruction prefetch circuit 5. As a result, the arithmetic processing circuit 4 and the instruction light receiving circuit 5 inhibit all updating of registers and the like within the arithmetic processing circuit 4. This means that the instruction in the instruction code set in the instruction code register 2 is sent to the instruction prefetch circuit 5.
The process is repeated every time the data is transferred from the computer to the arithmetic processing circuit 4. When the processing of the entire program is completed, the timer is stopped and the processing time To of the program is determined. Since the processing time T1 when the program is run without performance measurement mode is known in advance, the number of occurrences m of the instruction set in the instruction code register 2 is expressed as T6.
It is determined by substituting the values of TI, Ct, and n.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、性能測定モードである命
令の実行状態を指定されたクロック数保持し、性能測定
モードの場合と、性能測定モードでない場合のプログラ
ムの流れている時間も比較することにより、ある命令の
出現回数などをプログラムの解析をしないで調べること
ができる効果がある。
As explained above, the present invention maintains the execution state of an instruction in performance measurement mode for a specified number of clocks, and also compares the program flow time in performance measurement mode and in non-performance measurement mode. This has the effect of allowing you to check the number of occurrences of a certain instruction without analyzing the program.

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

第1図は本発明の情報処理装置の一実施例の要部のブロ
ック図である。 1・・・モードレジスタ、 2・・・命令コードレジスタ、 3・・・演算処理抑止回路、 4・・・演算処理回路、 5・・・命令先取り回路、 6〜10・・・信号線、 11・・・比較回路、 12・・・サプレス信号発生回路、 13・・・アンドゲート。
FIG. 1 is a block diagram of essential parts of an embodiment of an information processing apparatus of the present invention. DESCRIPTION OF SYMBOLS 1...Mode register, 2...Instruction code register, 3...Arithmetic processing suppression circuit, 4...Arithmetic processing circuit, 5...Instruction prefetch circuit, 6-10...Signal line, 11 ... Comparison circuit, 12 ... Suppress signal generation circuit, 13 ... AND gate.

Claims (1)

【特許請求の範囲】[Claims] 演算処理手段を有する情報処理装置において、命令コー
ドを保持する命令コード保持手段と、情報処理装置が性
能測定モードであることを指示するモード指示手段と、
前記モード指示手段により、性能測定モードであること
を指示された場合、前記命令コード保持手段により指示
された命令が前記情報処理装置の前記演算処理手段によ
り処理される時、指定されたクロック数だけ前記演算処
理手段を同じ状態に保持する演算処理抑止手段を有する
ことを特徴とする情報処理装置。
In an information processing apparatus having an arithmetic processing means, an instruction code holding means for holding an instruction code, a mode instruction means for instructing that the information processing apparatus is in a performance measurement mode,
When the performance measurement mode is instructed by the mode instruction means, when the instruction specified by the instruction code holding means is processed by the arithmetic processing means of the information processing device, the operation is performed for a specified number of clocks. An information processing device comprising: arithmetic processing inhibiting means for maintaining the arithmetic processing means in the same state.
JP63002314A 1988-01-07 1988-01-07 Information processor Pending JPH01177647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63002314A JPH01177647A (en) 1988-01-07 1988-01-07 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63002314A JPH01177647A (en) 1988-01-07 1988-01-07 Information processor

Publications (1)

Publication Number Publication Date
JPH01177647A true JPH01177647A (en) 1989-07-13

Family

ID=11525876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63002314A Pending JPH01177647A (en) 1988-01-07 1988-01-07 Information processor

Country Status (1)

Country Link
JP (1) JPH01177647A (en)

Similar Documents

Publication Publication Date Title
US5675729A (en) Method and apparatus for performing on-chip measurement on a component
JPS5886648A (en) Tracing device
US7110934B2 (en) Analysis of the performance of a portion of a data processing system
US20060048011A1 (en) Performance profiling of microprocessor systems using debug hardware and performance monitor
US20020078329A1 (en) Watchpoint engine for a pipelined processor
JPH01177647A (en) Information processor
JPH01177648A (en) Information processing device
JP2716166B2 (en) Information processing device
SU754419A1 (en) Memory control device
JPS59183434A (en) Prefetch control system of instruction
JP2775830B2 (en) Instruction frequency measurement method
SU934474A1 (en) Programme-interrupting device
JPS6144346B2 (en)
JPH0528002A (en) Microprocessor
JPS62109140A (en) Tracing circuit for program processor
JPH0619752A (en) Microcomputer
KR100705847B1 (en) Data processor with a debug circuit
SU1670688A1 (en) Device for checking programs
JPS6284348A (en) Microcomputer
JPH0378832A (en) Data processor
JPH0357970A (en) Pulse input apparatus
JPH05303512A (en) Trace device for mpu
JPH03157739A (en) Performance measuring system for epu
JPH02205942A (en) Information processor
JPS63113743A (en) Debugging system for computer hardware