JPS63181045A - Data processor - Google Patents

Data processor

Info

Publication number
JPS63181045A
JPS63181045A JP62013531A JP1353187A JPS63181045A JP S63181045 A JPS63181045 A JP S63181045A JP 62013531 A JP62013531 A JP 62013531A JP 1353187 A JP1353187 A JP 1353187A JP S63181045 A JPS63181045 A JP S63181045A
Authority
JP
Japan
Prior art keywords
display circuit
register
instruction
display
execution
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
JP62013531A
Other languages
Japanese (ja)
Inventor
Shinji Oga
大賀 伸二
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 JP62013531A priority Critical patent/JPS63181045A/en
Publication of JPS63181045A publication Critical patent/JPS63181045A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To automatically obtain an exact measured value and to obtain an instruction execution time for a specified instruction group or an individual instruction, by selecting a software instruction which measures the instruction execution time and the number of instructions to be executed by a hardware and registers them on a memory. CONSTITUTION:The titled device is constituted with the memory 1, an address register 2, an instruction word register 3, a selection circuit 4, a first display circuit 5, a second display circuit 6, a third display circuit 7, two logic circuits 8 and 9, a counter register 10 and a timer register 11. The counter register 10 steps when a content stored in the memory 1 read out at every start of the execution of the software instruction is an object targeted to be measured and also the first and the second display circuits 5 and 6 are placed under set states. The timer register 11 steps when the content stored in the memory read out at every start of the execution of the software instruction is the object targeted to be measured and also the first and the third display circuits 5 and 7 are placed under the set states. The average execution time of the software instruction in a program to be measured in a measuring period can be obtained from each value of the counter register 10 and the timer register 11.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は被測定プログラム内のソフトウェア命令の平均
実行時間を得るデータ処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a data processing device that obtains the average execution time of software instructions in a program under test.

(従来の技術) 従来、プログラムの平均実行時間を計測するときには、
モニタプログラムが中央処理装置に備わっているタイマ
の値を読出し、記憶してから被測定プログラムの実行を
開始させ、実行終了後に再びタイマの値を読出して、両
タイマ値の減算により被測定プログラムの実行時間を得
るか、または、専用の計測器を接続して実行時間を得、
一方、被測定プログラム内の実行命令数は人手によりソ
ースプログラム上で数えることによって得、平均命令実
行時間は実行時間を実行命令数で除算して求めている。
(Prior art) Conventionally, when measuring the average execution time of a program,
The monitor program reads the value of a timer provided in the central processing unit, stores it, starts execution of the program under test, reads the timer value again after execution, and subtracts the values of both timers to determine the value of the program under test. Get the execution time, or connect a dedicated instrument to get the execution time,
On the other hand, the number of executed instructions in the program under test is obtained by manually counting the source program, and the average instruction execution time is obtained by dividing the execution time by the number of executed instructions.

(発明が解決しようとする問題点) 上述した従来技術においては、被測定プログラムの開始
と終了時にタイマを読出す必要があるためオーバーヘッ
ドタイムが伴ない得られる実行時間が不正確であるし、
また、被測定プログラム内の全命令が計測対象となって
しまうため個別の命令の実行時間は計測できずコンピュ
ータシステムの性能評価上不便であり、また、実行命令
数を人手によシ数えなければならないので工数がかかり
すぎるし、まだ、専用の計測器はデータ処理装置に近い
構成になるため高価であり、さらにその接続のためには
被測定装置に専用の多くの端子を設けなければならない
という多くの問題点がある。
(Problems to be Solved by the Invention) In the above-mentioned conventional technology, since it is necessary to read the timer at the start and end of the program under test, overhead time is involved and the obtained execution time is inaccurate;
In addition, since all instructions in the program under test are subject to measurement, the execution time of individual instructions cannot be measured, which is inconvenient for evaluating the performance of computer systems, and the number of executed instructions must be counted manually. However, the dedicated measuring instruments are still expensive because they have a configuration similar to that of a data processing device, and in order to connect them, many dedicated terminals must be installed on the device under test. There are many problems.

(問題点を解決するための手段) 本発明の装置は、ソフトウェア命令ごとに計測対象・非
対象の別が予め登録されるメモリと、計測期間を表示す
るためにセット状態とされる第1表示回路と、 被測定プログラムが走行中に被測定プログラム内のソフ
トウェア命令が実行開始時に設定され保持される命令語
レジスタと、 ソフトウェア命令の設定の度にセットされlクロック後
にリセットされる第2表示回路と、一連のソフトウェア
命令の最初の実行開始に応答してセットされソフトウェ
ア命令中断信号に応答してリセットされる第3表示回路
と、ソフトウェア命令の実行開始の度に読出されるメモ
リの記憶内容が計測対象でありかつ第1表示回路と第2
表示回路が共にセット状態であるときに歩進するカウン
タレジスタと、 ソフトウェア命令の実行開始の度に読出されるメモリの
記憶内容が計測対象でありかつ第1表示回路と第3表示
回路が共にセット状態であるときに歩進するタイマレジ
スタ とを有し、カウンタレジスタとタイマレジスタの各値か
ら計測期間中における被測定プログラム内のソフトウェ
ア命令の平均実行時間を得られるようにした。
(Means for Solving the Problems) The device of the present invention includes a memory in which the measurement target/non-target is registered in advance for each software command, and a first display that is set to display the measurement period. a command word register that is set and held when a software command in the program under test starts executing while the program under test is running; and a second display circuit that is set each time a software command is set and reset after one clock. a third display circuit that is set in response to the first start of execution of a series of software instructions and reset in response to a software instruction abort signal; The measurement target and the first display circuit and the second
The measurement target is a counter register that increments when both display circuits are in the set state, and the memory contents that are read out each time execution of a software instruction starts, and both the first display circuit and the third display circuit are set. It has a timer register that increments when the program is in the state, and the average execution time of software instructions in the program under test during the measurement period can be obtained from each value of the counter register and the timer register.

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

第1図は本発明の一実施例を示すブロック図であり、メ
モリ1.アドレスレジスタ2.命令語レジスタ32選択
回路4.第1表示回路5.第2表示回路6.第3表示回
路7,2つの論理積回路8゜9、カウンタレジスタ10
およびタイマレジスタ11で構成される。
FIG. 1 is a block diagram showing one embodiment of the present invention, in which memory 1. Address register 2. Instruction word register 32 selection circuit 4. First display circuit5. Second display circuit 6. Third display circuit 7, two AND circuits 8゜9, counter register 10
and a timer register 11.

メモリ1は256語×1ビット/語構成であり、各語は
アドレスレジスタ2に設定されるアドレスまたは命令語
レジスタ3に設定される命令の8ビツトから成るオペレ
ージ璽ンコードで指定され、命令実行時間の計測に先立
って、計測対象とする命令に対応する語には′l”、ま
た、計測非対象とする命令対応の語には00′ をマイ
クロ命令により予め書込まれる。
Memory 1 has a structure of 256 words x 1 bit/word, and each word is specified by an address set in address register 2 or an 8-bit operating code of an instruction set in instruction word register 3, and the instruction execution time is Prior to measurement, ``l'' is written in advance to the word corresponding to the instruction to be measured, and 00' to the word corresponding to the instruction not to be measured, by a microinstruction.

アドレスレジスタ2は、上記書込みに使用されるアドレ
スがマイクロ命令により設定され、この、1にはアドレ
スレジスタ2の内容を受入れる選択回路4を介してメモ
リ1に供給する。命令語レジスタ3は、被測定プログラ
ムが走行中に被測定プログラム内のソフトウェア命令が
実行開始時に設定され保持し、また、モニタプログラム
内のソフトウェア命令等地の命令も設定され得る命令語
レジスタ3に設定された被測定プログラム内のソフトウ
ェア命令は選択回路4を介してメモリ1に供給される。
In the address register 2, the address used for the above writing is set by a microinstruction, and this 1 is supplied to the memory 1 via a selection circuit 4 that accepts the contents of the address register 2. The instruction word register 3 is used to set and hold software instructions in the program under test at the start of execution while the program under test is running, and to which other instructions such as software instructions in the monitor program can also be set. Software instructions in the set program under test are supplied to the memory 1 via the selection circuit 4.

選択回路4は、上記の説明から明らかのように、メモリ
1への書込み時にはアドレスレジスタ2、また、メモリ
1からの読出し時には命令語レジスタ3の各内容を選択
するようにマイクロ命令により制御される。
As is clear from the above description, the selection circuit 4 is controlled by a microinstruction to select the contents of the address register 2 when writing to the memory 1 and the contents of the instruction register 3 when reading from the memory 1. .

第1表示回路5、第2表示回路6および第3表示回路7
は、ムずれも7リツプフロツプで実現できる。第1表示
回路5は、命令実行時間の計測開始時にマイクロ命令に
よりセット状態(′1”)となり、計測終了時にリセッ
ト状態(”0”)となる。
First display circuit 5, second display circuit 6 and third display circuit 7
This can be achieved with 7 lip-flops. The first display circuit 5 is set to a set state ('1') by a microinstruction when the instruction execution time measurement starts, and is set to a reset state ('0') at the end of the measurement.

第2表示回路6は命令語レジスタ3にソフトウェア命令
が実行開始時に設定される度にセット状態(′1”)と
なり、lクロック後にリセット状態じ0”)となる。ま
た、第3表示回路7は命令語レジスタ3に一連のソフト
ウェア命令の最初のソフトウェア命令が実行開始時に設
定されるとセット状態(”1”)となり、割込み等に基
づくソフトウェア命令中断信号に応答してリセット状態
CO”)となる。
The second display circuit 6 enters a set state ('1") every time a software instruction is set in the instruction word register 3 at the start of execution, and becomes a reset state (0") one clock later. Further, the third display circuit 7 enters a set state (“1”) when the first software instruction of a series of software instructions is set in the instruction word register 3 at the start of execution, and responds to a software instruction interrupt signal based on an interrupt or the like. and enters the reset state CO'').

論理積回路8は、メモリ1からの読出し内容。The AND circuit 8 is the content read from the memory 1.

第1表示回路5の表示および第2表示回路6の表示が全
て′1″ のとき、すなわち、計測期間中に計測対象の
ソフトウェア命令が新たに命令語レジスタ3に設定され
る度にのみ、クロックCLKに応答して′1” を出力
し、カウンタレジスタ10はこの出力に応答して歩進す
る。従って、カウンタレジスタ10は計測期間中におけ
る計測対象のソフトウェア命令数を計数することになる
Only when the display of the first display circuit 5 and the display of the second display circuit 6 are '1'', that is, each time a software instruction to be measured is newly set in the instruction word register 3 during the measurement period, the clock is displayed. It outputs '1' in response to CLK, and counter register 10 increments in response to this output. Therefore, the counter register 10 counts the number of software instructions to be measured during the measurement period.

また、論理積回路9は、メモリ1からの読出し内容、第
1表示回路5の表示および第3表示回路7の表示が全て
′1” のとき、すなわち、計測期間中におけるンフト
ウェア命令実行時間中にのみ、クロックCLKを受入れ
て出力し、タイマレジスタ11はこの出力に応答して歩
進する。従ってタイマレジスタ11は計測期間中におけ
る命令実行時間を計数することになる。
The AND circuit 9 also operates when the contents read from the memory 1, the display on the first display circuit 5, and the display on the third display circuit 7 are all '1'', that is, during the software instruction execution time during the measurement period. The clock CLK is accepted and output only during this period, and the timer register 11 increments in response to this output.Therefore, the timer register 11 counts the instruction execution time during the measurement period.

次に、第2図に示すタイムチャートによって本実施例の
動作を説明する。
Next, the operation of this embodiment will be explained with reference to the time chart shown in FIG.

第2図は、説明を単純化するために、第3表示回路7は
9クロックの期間だけ′1” を表示し、この間にいず
れもメモリ1に1” が予め登録されている3つのソフ
トウェア命令工x、I2 およびI3が命砂飴レジスタ
3に設定される場合を例示している。
In FIG. 2, in order to simplify the explanation, the third display circuit 7 displays ``1'' for a period of 9 clocks, and during this period three software instructions, all of which have 1'' registered in advance in the memory 1, are executed. A case is illustrated in which the numbers x, I2, and I3 are set in the life sand candy register 3.

第1表示回路5は既にセット状態罠なっており、タイミ
ングT1にお(へてソフトウェア命令実行の中断期間が
終了して、ソフトウェア命令11がタイミングTlで設
定され、タイミングT1から4クロックの間だけ実行さ
れる。同様に、ソフトウェア命令I2と工3がタイミン
グT2とT3でそれぞれ命令語レジスタ3に設定され、
それぞれタイミングT2から2クロックとタイミングT
3から3クロックの間だけ実行される。タイミングT3
から3クロック後にはソフトウェア命令中断信号が入力
するものとする。
The first display circuit 5 is already in the set state trap, and at the timing T1 (the suspension period of software instruction execution ends, the software instruction 11 is set at the timing Tl, and only for 4 clocks from the timing T1). Similarly, software instructions I2 and 3 are set in instruction word register 3 at timings T2 and T3, respectively.
2 clocks from timing T2 and timing T, respectively.
It is executed for only 3 to 3 clocks. timing T3
It is assumed that a software instruction interrupt signal is input three clocks after the start.

以上のような状況に基づき、第2表示回路6の表示内容
(6)は、第2図に示すように、タイミングT1でセッ
ト状態、その1クロック後からタイミングT2″!!、
で間はリセット状態、タイミングT2でセット状態、そ
の1クロック後からタイミングT3までの間はリセット
状態、タイミングT3でセット状態、その1クロック後
以降はリセット状態となる。この結果、論理積回路8は
上記3回のセット状態の間のみクロックCLKを出力し
、カウンタレジスタ10はタイミングT1からタイミン
グT4までの間に、命令語レジスタ3に設定されたソフ
トウェア命令の数である「3」 だけ歩進することにな
る。
Based on the above situation, the display content (6) of the second display circuit 6 is as shown in FIG.
The state is in the reset state, the set state is at timing T2, the reset state is from one clock later to timing T3, the set state is at timing T3, and the reset state is after one clock. As a result, the AND circuit 8 outputs the clock CLK only during the above three set states, and the counter register 10 outputs the clock CLK by the number of software instructions set in the instruction word register 3 from timing T1 to timing T4. You will advance by a certain number of ``3''.

一方、第3表示回路7の表示内容(7)は、第2図に示
すように、タイミングT1からタイミングT4までの間
はセット状態となり、この結果、論理積回路9はこの間
のみクロックCLKを出力し、タイマレジスタ11は、
この間のクロックCLKの数(命令実行時間に相当)で
ある「9」 だけ歩進することになる。
On the other hand, the display content (7) of the third display circuit 7 is in a set state from timing T1 to timing T4, as shown in FIG. 2, and as a result, the AND circuit 9 outputs the clock CLK only during this period. However, the timer register 11 is
During this time, the number of clocks CLK (corresponding to the instruction execution time) is increased by "9".

第2図は、第1表示回路5がセット状態を保持している
計測期間中の一つの短期間のみを図示しているが、計測
期間中には、ソフトウェア命令中断信号により区切られ
るこのような短期間が複数個存在し得る。カウンタレジ
スタ10およびタイマレジスタ11は全ての短期間につ
いてそれぞれカウントした数を累積していき、第1表示
回路5がリセット状態になって計測期間が終了すると、
例えばソフトウェアによって読取られ、タイマレジスタ
11の内容をカウンタレジスタ10の内容で除算するこ
とにより、平均命令実行時間を求めることができる。
Although FIG. 2 only illustrates one short period during the measurement period during which the first display circuit 5 maintains the set state, during the measurement period such There may be multiple short periods. The counter register 10 and the timer register 11 accumulate the respective counts for all short periods, and when the first display circuit 5 enters the reset state and the measurement period ends,
For example, it can be read by software and the average instruction execution time can be determined by dividing the contents of the timer register 11 by the contents of the counter register 10.

(発明の効果) 本発明によれば、以上に説明したような小規模なハード
ウェアを設けることによシ、命令実行時間と実行命令数
とをハードウェアで計測できるため正確な計測値を自動
的に得られるようになり、また、メモリに登録しておく
ソフトウェア命令を自在に選択できるため、特定の命令
群や個別の命令に対する命令実行時間を得ることもでき
コンピュータシステムの評価上好都合である。
(Effects of the Invention) According to the present invention, by providing the small-scale hardware as described above, it is possible to measure the instruction execution time and the number of executed instructions using the hardware, so that accurate measurement values can be automatically obtained. In addition, since the software instructions to be registered in memory can be freely selected, the instruction execution time for a specific group of instructions or individual instructions can be obtained, which is convenient for evaluating computer systems. .

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

第1図は本発明の一実施例を示し、第2図は本実施例の
タイムチャートを示す。
FIG. 1 shows an embodiment of the present invention, and FIG. 2 shows a time chart of this embodiment.

Claims (1)

【特許請求の範囲】 ソフトウェア命令ごとに計測対象・非対象の別が予め登
録されるメモリと、 計測期間を表示するためにセット状態とされる第1表示
回路と、 被測定プログラムが走行中に該被測定プログラム内の前
記ソフトウェア命令が実行開始時に設定され保持される
命令語レジスタと、 前記設定の度にセットされ1クロック後にリセットされ
る第2表示回路と、 一連の前記ソフトウェア命令の最初の前記実行開始に応
答してセットされソフトウェア命令中断信号に応答して
リセットされる第3表示回路と、前記実行開始の度に読
出される前記メモリの記憶内容が前記計測対象でありか
つ前記第1表示回路と前記第2表示回路が共に前記セッ
ト状態であるときに歩進するカウンタレジスタと、 前記実行開始の度に読出される前記メモリの記憶内容が
前記計測対象でありかつ前記第1表示回路と前記第3表
示回路が共に前記セット状態であるときに歩進するタイ
マレジスタ とを有し、前記カウンタレジスタと前記タイマレジスタ
の各値から前記計測期間中における前記被測定プログラ
ム内のソフトウェア命令の平均実行時間を得られるよう
にしたデータ処理装置。
[Scope of Claims] A memory in which a measurement target or non-target is registered in advance for each software command; a first display circuit that is set to display a measurement period; and a first display circuit that is set to display a measurement period; an instruction word register in which the software instructions in the program under test are set and held at the start of execution; a second display circuit that is set each time the settings are made and reset one clock later; a third display circuit that is set in response to the start of execution and reset in response to a software instruction interrupt signal; and a third display circuit that is set in response to the start of execution and reset in response to a software instruction interrupt signal; a counter register that increments when both the display circuit and the second display circuit are in the set state; and the first display circuit whose measurement target is the stored content of the memory that is read every time the execution starts. and a timer register that increments when both the third display circuit and the third display circuit are in the set state, and the software instruction in the program under test during the measurement period is determined from each value of the counter register and the timer register. A data processing device that makes it possible to obtain average execution time.
JP62013531A 1987-01-22 1987-01-22 Data processor Pending JPS63181045A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62013531A JPS63181045A (en) 1987-01-22 1987-01-22 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62013531A JPS63181045A (en) 1987-01-22 1987-01-22 Data processor

Publications (1)

Publication Number Publication Date
JPS63181045A true JPS63181045A (en) 1988-07-26

Family

ID=11835743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62013531A Pending JPS63181045A (en) 1987-01-22 1987-01-22 Data processor

Country Status (1)

Country Link
JP (1) JPS63181045A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395644A (en) * 1989-09-08 1991-04-22 Matsushita Electric Ind Co Ltd Measuring device for instruction executing cycle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395644A (en) * 1989-09-08 1991-04-22 Matsushita Electric Ind Co Ltd Measuring device for instruction executing cycle

Similar Documents

Publication Publication Date Title
JPS63181045A (en) Data processor
US4992937A (en) Microcomputer having a program mode setting circuit
JPS6411977B2 (en)
JP2716166B2 (en) Information processing device
SU1437874A1 (en) Device for analyzing graph parameters
JPS642980B2 (en)
JPS6337436A (en) Program development backup device
JPS63156424A (en) Pulse count circuit
JPH0772875B2 (en) Micro program evaluation method
JPH06102329A (en) Integrated circuit device
JPH06259962A (en) Semiconductor memory device
JPH0296848A (en) Method for measuring execution time of instruction
JPH0810881Y2 (en) Error rate counter for DAT
JPS63170744A (en) Information processor
JPS6247752A (en) Counter circuit for number of instruction executions of information processor
JPS60209853A (en) Measuring device of program execution time
JPH02113347A (en) Tracer device
JPS61272840A (en) Test comprehensiveness measuring instrument for microcomputer program
JPH0619752A (en) Microcomputer
JPH02202646A (en) Micro program controller
JPH03240138A (en) Microprocessor
JPH0553855A (en) Performance measuring circuit for computer system
JPH0381832A (en) Interruption control circuit
JPH03134737A (en) Microprocessor
JPH0325536A (en) Firmware diagnostic device