JPS59160249A - Program testing device - Google Patents

Program testing device

Info

Publication number
JPS59160249A
JPS59160249A JP58035040A JP3504083A JPS59160249A JP S59160249 A JPS59160249 A JP S59160249A JP 58035040 A JP58035040 A JP 58035040A JP 3504083 A JP3504083 A JP 3504083A JP S59160249 A JPS59160249 A JP S59160249A
Authority
JP
Japan
Prior art keywords
branch instruction
instruction
address
address data
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
JP58035040A
Other languages
Japanese (ja)
Inventor
Haruo Takagi
高木 治夫
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.)
Omron Corp
Original Assignee
Tateisi Electronics Co
Omron Tateisi Electronics Co
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 Tateisi Electronics Co, Omron Tateisi Electronics Co filed Critical Tateisi Electronics Co
Priority to JP58035040A priority Critical patent/JPS59160249A/en
Publication of JPS59160249A publication Critical patent/JPS59160249A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To execute easily a program test by collecting a C1 coverage index showing whether the following instruction or an instruction of a jump destination is designated or not by a branch instruction, when a program containing the branch instruction is executed. CONSTITUTION:A CPU18 clears an RAM17 through a multiplexer 12 and OR gates 15, 16. When a CPU1 executes a branch instruction, an instruction decoder 2 decodes and outputs it, sets an FF4 by a timing pulse of an AND gate 3, and stores an address of the branch instruction in an address register 7. The CPU1 outputs the following instruction or an address data of a jump destination. An output of the FF4 is provided to registers 8, 10 by said timing pulse, reads the register 7, and the register 10 stores the following instruction. As for a data of the register 8, the jump destination is instructed by an adding circuit 9, and said data is compared 11 with a data of the register 10, and inputted to a memory 171 and a memory 172 in case of coincidence and dissidence, respectively. In this way, a test of a program is executed easily.

Description

【発明の詳細な説明】 発明の分野 この発明はプログラムテスト装置に関し、特に、分岐命
令を含むプログラムを実行したとき、分岐命令によって
指摘される次の命令またはジャンプ先を実行したか否か
をテストするようなプログラムテスト装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a program testing device, and more particularly, to a program testing device that, when a program including a branch instruction is executed, tests whether or not the next instruction or jump destination indicated by the branch instruction has been executed. The present invention relates to a program testing device for such purposes.

発明の背景 従来より、コンピュータにおけるプログラムが正常に実
行し得るか否かをテストするためには、作成されたプロ
グラムをデバッキングしてバグ出しを行なう必要がある
。しかし、このようなデバッキングを行なうためには、
大形のコンピュータなどを必要とし、簡単にプログラム
のテストを行なうことができなかった。
BACKGROUND OF THE INVENTION Conventionally, in order to test whether a program on a computer can be executed normally, it has been necessary to debug the created program to find bugs. However, in order to perform such debugging,
It required a large computer, and it was not possible to easily test the program.

一方、最近では、プログラムのテスト(またはデバッグ
)の完全性をチェックするために、プログラムがどう実
行されたかというよりも、むしろプログラム中のどの部
分がまだ実行されていないかをより効率的な手法によっ
て明らかにする必要性が生じてきた。そこで、最近では
プログラムのテストの一手法とてカバレージ分析が知ら
れている。カバレージ分析のうち複数のステップを含む
プログラムにおいて、少な(とも1回以上実行されたス
テップの数の割合のことをCl jyバレージ指椋と称
されている。このような01′hバレージ指揮を磁気テ
ープやフロッピィディスクなどのデータ収集装置に配録
し、その1ft01カバレージ指標を解析IAI!I+
する方法が考えられる。この方式はC1カバレージ指標
以降の高rIIなC2,C3カバレージ指標の作成が可
能であるという反面、バッジ処理とデータ量が多いため
解析に長時間を要する。特に、デバッグ時にデバッグの
*g状況がリアルタイムで確認できないという問題点が
あった。
On the other hand, these days, to check the integrity of testing (or debugging) a program, a more efficient method is to check what parts of the program have not yet been executed, rather than how the program has been executed. The need to clarify this has arisen. Therefore, recently, coverage analysis has become known as a method for testing programs. In a program that includes multiple steps in coverage analysis, the ratio of the number of steps executed at least once is called the Cl jy coverage index. Distribute data to a data collection device such as a tape or floppy disk, and analyze the 1ft01 coverage index IAI!I+
There are ways to do this. Although this method can create C2 and C3 coverage indices with high rII after the C1 coverage index, it requires a long time for analysis due to badge processing and a large amount of data. In particular, there was a problem in that the *g status of debugging could not be checked in real time during debugging.

発明の目的 それゆえに、この発明の主たる目的は、少なくとも分岐
命令を含むプログラムを実行したとき、その分岐命令に
よって次の命令またはジャンプ先の命令が指定されたか
否かを示すC1カバレージ指標を収集してプログラムを
テストするようなプログラムテスト装置を提供すること
である。
OBJECTS OF THE INVENTION Therefore, the main object of the present invention is to collect, when a program including at least a branch instruction is executed, a C1 coverage index indicating whether the next instruction or jump destination instruction is specified by the branch instruction. It is an object of the present invention to provide a program testing device that tests a program using

発明の構成おJ−び効果 この発明を要約すれば、分岐命令を含むプログラムをテ
ストするための@置であって、中央処理手段が分岐命令
を実行したときのデータをデコードし、そのデコード出
力に応じて中央処理手段から出力された分岐命令のアド
レスデータとその分岐命令によって指定される次の命令
のアドレスデータまたはジャンプ先のアドレスデータを
記憶し、次の命令またはジャンプ先のアドレスデータが
予め定める分岐先に進んだことを表わすデータであるか
否かを判別し、その判別出力に基づいて予め定める分岐
先にすすんだか否かを表わす2値信号を記憶するように
構成したものである。
Structure and Effects of the Invention To summarize the invention, the present invention is a device for testing a program including a branch instruction, which decodes data when a central processing means executes a branch instruction and outputs the decoded data. The address data of the branch instruction output from the central processing means according to the branch instruction and the address data of the next instruction or jump destination address data specified by the branch instruction are stored, and the address data of the next instruction or jump destination is It is configured to discriminate whether or not the data indicates that the branch has proceeded to a predetermined branch destination, and to store a binary signal indicating whether or not the branch has proceeded to the predetermined branch destination based on the discrimination output.

したがって、この発明によれば、実際にプログラムを処
理する中央処理手段から、分岐命令によって指定される
次の命令またはジャンプ先に進んだか否かを表わすC1
カバレージ指標を極めて容易に収集することができる。
Therefore, according to the present invention, C1, which indicates whether or not the central processing means that actually processes the program has proceeded to the next instruction or jump destination specified by the branch instruction,
Coverage metrics can be collected very easily.

したがって、収集したC1カバレージ指標を判別するこ
とによって、分岐命令のどの部分がまだ実行されていな
いかをより効率的にかつ客観的に明らかにできるので、
高品質な70グラムを効率良(開発することが可能とな
る。
Therefore, by determining the collected C1 coverage metrics, it is possible to more efficiently and objectively reveal which part of the branch instruction has not yet been executed.
It becomes possible to efficiently (develop) high-quality 70 grams.

以下に、図面に示す実施例とともにこの発明をより詳細
に説明する。
The invention will be explained in more detail below along with embodiments shown in the drawings.

実施例の説明 第1図はこの発明の一実施例の概略ブロック図である。Description of examples FIG. 1 is a schematic block diagram of an embodiment of the present invention.

まず、第1図を参照して構成について説明する。中央処
理手段としてのCPU1は内蔵されているプログラムを
実際に実行するものであって、このCPU1にはデータ
バスDBとアドレスバスABとコントロールバスC8と
が接続される。
First, the configuration will be explained with reference to FIG. A CPU 1 serving as a central processing means actually executes a built-in program, and is connected to a data bus DB, an address bus AB, and a control bus C8.

5− データバスDBには命令デコーダ2が接続される。5- An instruction decoder 2 is connected to the data bus DB.

この命令デコーダ2はCPU1がプログラムに含まれる
分岐命令を実行したときに、データバスDBに出力され
るフェッチデータをデコードすることによって分岐命令
を検出するものである。命令デコーダ2によって分岐命
令に基づ(データがデコードされると、そのデコード出
力はANDゲート3の一方入力端に与えられる。このA
NDゲート3の他方入力端には侵述のコントロール回路
21からデコードフェッチタイミングパルスT1が与え
られる。ANDゲート3はこのタイミングパルスT1に
同期して命令デコーダ2のデコード出力をフリップ70
ツブ4のセット入力端とアドレスレジスタ7とに与える
。フリップフロップ4のQ出力はANDゲート5の一方
入力端に与えられ、その他方入力端にはタイミングパル
スT1が与えられる。したがうて、ANDゲート5はフ
リップフロップ4がセットされると、タイミングパルス
T1に同期したパルスをレジスタ8と10とに与えると
ともに、デレー回路6を介してフリップフ6− ロップ4のリセット入力端とANDゲート13と14の
それぞれの一方入力端に与える。デレー回路6はI C
P LJサイクル期間だけ遅延するものである。したが
って、フリップフロップ4は命令デコーダ2が分岐命令
を検出したときにセットされ、その後分岐命令による行
先のアドレスを出力するICPLIサイクル期間経過後
にリセットされる。
The instruction decoder 2 detects a branch instruction by decoding fetch data output to the data bus DB when the CPU 1 executes a branch instruction included in a program. When data is decoded by the instruction decoder 2 based on the branch instruction, the decoded output is given to one input terminal of the AND gate 3.
A decode fetch timing pulse T1 is applied to the other input terminal of the ND gate 3 from a control circuit 21 mentioned above. The AND gate 3 flips the decoded output of the instruction decoder 2 in synchronization with this timing pulse T1.
It is applied to the set input terminal of knob 4 and address register 7. The Q output of the flip-flop 4 is applied to one input terminal of an AND gate 5, and the timing pulse T1 is applied to the other input terminal. Therefore, when the flip-flop 4 is set, the AND gate 5 provides a pulse synchronized with the timing pulse T1 to the registers 8 and 10, and also connects the reset input terminal of the flip-flop 6 to the reset input terminal of the flip-flop 4 via the delay circuit 6. It is applied to one input terminal of each of gates 13 and 14. Delay circuit 6 is IC
It is delayed by the P LJ cycle period. Therefore, the flip-flop 4 is set when the instruction decoder 2 detects a branch instruction, and then reset after the ICPLI cycle period for outputting the destination address of the branch instruction.

すなわち、フリップ70ツブ3は分岐命令が出力されて
から、その分岐命令によって分岐されろ行先のアドレス
が出力されるまでの間セットされている。
That is, the flip 70 knob 3 is set from the time a branch instruction is output until the address of the destination to which the branch is to be branched is output by the branch instruction.

コントロールバスCBにはコントロール回路21が接続
される。このコントロール回路21は実際にプログラム
を実行するCPU1と、このプログラムをテストするた
めのCPU18との同期をとるためのオペコードフェッ
チタイミングパルスT1を発生するものである。また、
アドレスバスABにはアドレスレジスタ7とレジスタ1
0とが接続される。アドレスレジスタ7は命令デコーダ
2が分岐命令を検出したときすなわちCPU1が分岐命
令を実行したときのアドレスデータを記憶するものであ
る。アドレスレジスタ7に記憶されたアドレスデータは
後段のレジスタ8に記憶される。このレジスタ8はアド
レスレジスタ7にアドレスデータが記憶された慢、次の
処理のためにアドレスレジスタ7を空にしておく必要が
あるために設けられる。レジスタ10は分岐命令が実行
された後、その分岐命令によって指定される行先のアド
レスデータを記憶するものである。レジスタ8に記憶さ
れたアドレスデータは加算回路9に与えられる。加詐回
ff19はレジスタ8に記憶されている分岐命令のアド
レスデータに、そのアドレスデータとジ1Pンプ先のア
ドレスとの差のアドレスたとえば3を加算するものであ
る。加算回路9の出力は比較回路11によってレジスタ
1oに記憶されているジャンプ先のアドレスデータと比
較される。比較回i’811は両者が一致するとハイレ
ベルの一致信号をへNDゲート13の一方入力端に与え
るとともに、インバータ21で反転してANDゲート1
4の一方入力端に与える。ANDゲート13はデレー回
路6によって遅延されたパルスすなわちCPU1が分岐
命令に基づいて次の行先のアドレス信号を出力した後、
比較回路11の一致信号を、ORゲート15を介してR
AM17に与える。他方、ANDゲート14は比較回路
11が一致信号を出力しないときORゲート16を介し
て信号をRAM17に与える。RAM17はCPU1が
指定し得る最大アドレスに対応した記憶領域を含む。す
なわち、RAM17はCPU1が8ビツトであれば、6
4にバイトX 1bitのRAMを2個分含んで構成さ
れ、その左側の記憶領域171は分岐命令によって次の
ステップに進んだか否かを表わす2値信号を記憶し、右
側の記憶領域172は分岐命令によってジャンプ先のス
テップに進んだか否かを表わす2値信号を記憶する。
A control circuit 21 is connected to the control bus CB. This control circuit 21 generates an operation code fetch timing pulse T1 for synchronizing the CPU 1, which actually executes a program, and the CPU 18, which tests this program. Also,
Address bus AB has address register 7 and register 1.
0 is connected. The address register 7 stores address data when the instruction decoder 2 detects a branch instruction, that is, when the CPU 1 executes the branch instruction. The address data stored in the address register 7 is stored in the register 8 at the subsequent stage. This register 8 is provided because it is necessary to empty the address register 7 for the next processing after address data is stored in the address register 7. The register 10 stores the address data of the destination specified by the branch instruction after the branch instruction is executed. The address data stored in register 8 is given to adder circuit 9. The addition circuit ff19 is for adding, to the address data of the branch instruction stored in the register 8, the difference between the address data and the jump destination address, for example, 3. The output of the adder circuit 9 is compared by a comparator circuit 11 with the jump destination address data stored in the register 1o. When the two match, the comparison circuit i'811 gives a high-level match signal to one input terminal of the ND gate 13, and inverts it with the inverter 21 and outputs it to the AND gate 1.
4 to one input terminal. The AND gate 13 outputs a pulse delayed by the delay circuit 6, that is, after the CPU 1 outputs the next destination address signal based on the branch instruction.
The match signal of the comparison circuit 11 is passed through the OR gate 15 to R
Give it to AM17. On the other hand, AND gate 14 provides a signal to RAM 17 via OR gate 16 when comparison circuit 11 does not output a match signal. The RAM 17 includes a storage area corresponding to the maximum address that the CPU 1 can specify. In other words, if CPU1 is 8 bits, RAM17 is 6 bits.
The storage area 171 on the left side stores a binary signal indicating whether or not the process has proceeded to the next step due to a branch instruction, and the storage area 172 on the right side stores a binary signal indicating whether the branch instruction has proceeded to the next step. A binary signal indicating whether or not the instruction has led to a jump destination step is stored.

このRAM17はマルチプレクサ12からのアドレスデ
ータによってアドレス指定される。マルチプレクサ12
はレジスタ8に記憶されているアドレスデータとCPU
1Bから出力されるアドレスデータとを切換えるもので
ある。
This RAM 17 is addressed by address data from multiplexer 12. Multiplexer 12
is the address data stored in register 8 and the CPU
This is used to switch the address data output from 1B.

一〇− CP 0181.Lこの発明の特徴となるC1カバレー
ジ指標を収集するための制御を行なうものであって、前
述のORゲート15.16にクリア信号を与えるととも
に、ORゲート20の一方入力端とANDゲート19の
一方入力端にもクリア信号を与える。このORゲート2
0にはCPU18からリード指令信号が与えられる。O
Rゲート20はCPU18側 信号が与えられると、マルチプレクサ12をCPU18
側のアドレスに切換える。マルチプレクサ12がCPU
18側のアドレスに切換えられると、RAM17に記憶
されているデータが読出されてCPU18側 第2図はこの発明の一実施例によってテストされるべき
プログラムの一例を示すフロー図である。
10-CP 0181. L It performs control for collecting the C1 coverage index, which is a feature of this invention, and provides a clear signal to the above-mentioned OR gates 15 and 16, as well as one input terminal of the OR gate 20 and one input terminal of the AND gate 19. Give a clear signal to the input terminal as well. This OR gate 2
0 is given a read command signal from the CPU 18. O
When the R gate 20 receives the CPU 18 side signal, the R gate 20 switches the multiplexer 12 to the CPU 18 side signal.
switch to the side address. Multiplexer 12 is CPU
When the address is switched to the address on the 18 side, the data stored in the RAM 17 is read out and the CPU 18 side is read out. FIG. 2 is a flow diagram showing an example of a program to be tested according to an embodiment of the present invention.

第3図ないし第5図はこの発明の一実施例の具体的な動
作を説明するためのフロー図であり、特に、第3図はC
PU18によってRAM17を初期設定する場合の動作
を説明するためのフロー図であり、第4図はC1カバレ
ージ指標をRAM17に10− 収集する動作を説明するためのフロー図であり、第5図
はRAM17の01カバレージ指標をCPU18に読込
む動作を説明するためのフロー図である。
3 to 5 are flowcharts for explaining the specific operation of one embodiment of the present invention. In particular, FIG.
FIG. 4 is a flowchart for explaining the operation when the RAM 17 is initialized by the PU 18; FIG. 4 is a flowchart for explaining the operation for collecting the C1 coverage index into the RAM 17; FIG. FIG. 3 is a flowchart for explaining the operation of reading the 01 coverage index into the CPU 18. FIG.

次に、第2図ないし第5図を参照して第1図の動作につ
いて説明する。まず、CPU18は第3図に示すフロー
図に従ってRAM17を初期設定する。すなわち、CP
LllBはそのアドレスバスに0のアドレスデータを出
力する。そして、クリア指令信号を出りしてマルチプレ
クサ12をCPU18のアドレス側に切換える。また、
クリア指令信号はORゲート15および16を介してR
AM17に与えられる。CPu18は順次アドレスを更
新してRAM17の各アドレスにOをセットする。
Next, the operation shown in FIG. 1 will be explained with reference to FIGS. 2 to 5. First, the CPU 18 initializes the RAM 17 according to the flowchart shown in FIG. That is, C.P.
LllB outputs address data of 0 to its address bus. Then, a clear command signal is issued to switch the multiplexer 12 to the address side of the CPU 18. Also,
The clear command signal is sent to R via OR gates 15 and 16.
Given on AM17. The CPU 18 sequentially updates the addresses and sets O to each address in the RAM 17.

一方、CPU1は第4図に示すごとく、内蔵されている
たとえば第2図に示すようなプログラムの動作を実行す
る。CPU1から分岐命令が出力されると、命令デコー
ダ2は分岐命令を検出し、検出(F1号を出力する。A
NDゲート3はタイミングパルスT1に同期して検出信
号を出力して、フリップ70ツブ4をセットするととも
に、アドレスレジスタ7にcpuiが分岐命令を実行し
たときのアドレスデータを記憶させる。CPU1は分岐
命令を実行した慢、次の命令あるいはジャンプ先を表わ
すアドレスデータを出力する。このタイミングにおいて
、コントロール回路21からタイミングパルスT1が出
力される。すると、ANDゲート5はタイミングパルス
T1に同期してフリップフロップ4の出力をレジスタ8
と10とに与える。レジスタ8はアドレスレジスタ7に
記憶されているアドレスデータを読込み、レジスタ10
はCPU1から出力された次の命令あるいはジャンプ先
のアドレスデータを記憶する。加算回路9はレジスタ8
に記憶されている分岐命令のアドレスデータにたとえば
+3を加梼する。これは第2図に示すように分岐命令に
よって3アドレス先のジャンプ先を示すためである。
On the other hand, as shown in FIG. 4, the CPU 1 executes the operation of a built-in program, for example, as shown in FIG. 2. When a branch instruction is output from the CPU 1, the instruction decoder 2 detects the branch instruction and outputs detection (F1.A).
The ND gate 3 outputs a detection signal in synchronization with the timing pulse T1, sets the flip 70 knob 4, and causes the address register 7 to store address data when the CPU executes a branch instruction. After executing the branch instruction, the CPU 1 outputs address data representing the next instruction or jump destination. At this timing, the control circuit 21 outputs a timing pulse T1. Then, the AND gate 5 transfers the output of the flip-flop 4 to the register 8 in synchronization with the timing pulse T1.
and 10. Register 8 reads the address data stored in address register 7, and register 10
stores the next instruction output from the CPU 1 or the jump destination address data. Adder circuit 9 is register 8
For example, +3 is added to the address data of the branch instruction stored in the address data. This is because the branch instruction indicates a jump destination three addresses ahead, as shown in FIG.

比較回路11は加算回路9から出力されたアドレスデー
タとレジスタ10に記憶されているアドレスデータとを
比較して一致しているか否かを判別する。一致していれ
ばハイレベルのパルス信号をA、NDゲート13に与え
る。ANDゲート13の他方入力端にはデレー回路6に
よってI CPUサイクル期間だけ遅延したパルス信号
が与えられる。したがって、ANDゲート13はORゲ
ート15を介して書込信号をRAM17に与える。なお
、このときマルチプレクサ12はcpuiのアドレス側
に切換えられている。したがって、レジスタ8に記憶さ
れている分岐命令のアドレスデータに対応するRAM1
7の左側の記憶領域171アドレスが指定され、そこに
2値信号が書込まれる。もし、比較回路11が加算回路
9からのアドレスデータとレジスタ10に記憶されてい
るアドレスデータとの不一致を判別したとき、ローレベ
ルの信号を出力する。このローレベルの信号はインバー
タ21で反転されてANDゲート14に与えられる。し
たがって、ANDゲート14はレジスタ10に記憶され
ているアドレスデータがジャンプ先のアドレスではなく
次のアドレスすなわち13− 第2図に示すBであるときその旨を表わす2m!信号を
RAM17の右側の記憶側172に書込む。
Comparison circuit 11 compares the address data output from adder circuit 9 and the address data stored in register 10 to determine whether they match. If they match, a high level pulse signal is given to the A and ND gates 13. A pulse signal delayed by the I CPU cycle period is applied to the other input terminal of the AND gate 13 by the delay circuit 6. Therefore, AND gate 13 provides a write signal to RAM 17 via OR gate 15. Note that, at this time, the multiplexer 12 is switched to the CPUI address side. Therefore, RAM1 corresponding to the address data of the branch instruction stored in register 8
The storage area 171 address on the left side of 7 is specified, and a binary signal is written there. If the comparator circuit 11 determines that there is a mismatch between the address data from the adder circuit 9 and the address data stored in the register 10, it outputs a low level signal. This low level signal is inverted by the inverter 21 and applied to the AND gate 14. Therefore, when the address data stored in the register 10 is not the jump destination address but the next address, that is, 13-B shown in FIG. 2, the AND gate 14 indicates 2m! The signal is written to the right storage side 172 of the RAM 17.

この動作を繰返し、CPU1が分岐命令を実行するごと
に、その分岐先が次のステップであるかあるいはジャン
プ先のステップであるかを表わす2値信号をRAM17
に書込まれる。
This operation is repeated, and each time the CPU 1 executes a branch instruction, a binary signal indicating whether the branch destination is the next step or a jump destination step is stored in the RAM 17.
written to.

次に、第5図を参照してRAM17に記憶された2値信
号を読出す場合の動作につ1て説明する。
Next, referring to FIG. 5, the operation for reading out the binary signal stored in the RAM 17 will be explained.

まず、CPu1Bはリード指令信号を出力してマルチプ
レクサ12をCPU18のアドレス側に切換える。した
がって、以lRAM17はcpui8からのアドレスに
よってアドレス指定される。
First, the CPU 1B outputs a read command signal to switch the multiplexer 12 to the address side of the CPU 18. Therefore, from now on, RAM17 is addressed by the address from cpui8.

CPLllBはアドレスデータをOにセットし、リード
指令を出力する。その結束、RAMIの左側の記憶領域
171および右側の記憶領域172のそれぞれのアドレ
ス0の番地から2値信号が読出される。cpu’+aは
順次アドレスを更新して、RAM17の0か5255番
地に書込まれている2値(fi号を読出してCPtJl
Bのデータバスに出力する。
CPLllB sets address data to O and outputs a read command. A binary signal is read from address 0 of each of the storage area 171 on the left side and the storage area 172 on the right side of RAMI. cpu'+a sequentially updates the address and reads the binary value (fi number) written in address 0 or 5255 of RAM 17 and reads CPtJl.
Output to B data bus.

14− 上述のごとく、この実施例によれば、CPU1が分岐命
令を実行したとき分岐先が次のステップであるかあるい
はジャンプ先のステップであるかを表わすC1カバレー
ジ指標をRAM17に書込むことができる。したがって
、RAM170H側の記憶領1iff171および右側
の記憶領域172の内容を判別することによって、分岐
命令によっていずれの行先が実行されたか否かを容易に
判別することができる。
14- As described above, according to this embodiment, when the CPU 1 executes a branch instruction, the C1 coverage index indicating whether the branch destination is the next step or the jump destination step can be written to the RAM 17. can. Therefore, by determining the contents of the storage area 1iff171 on the RAM 170H side and the storage area 172 on the right side, it is possible to easily determine which destination has been executed by the branch instruction.

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

第1図はこの発明の一実施例の概略ブロック図である。 第2図はこの発明の一実施例によってテストされるべき
プログラムの一例のフロー図である。第3図ないし第5
図はこの発明の一実施例の具体的な動作を説明するため
のフロー図であり、特に第353は第2@lに示すRA
Mを初miQ定する場合の動作を説明するためのフロー
図であり、第4図はRAMに書込まれたC1カバレージ
指標を収集する動作を説明するためのフロー図であり、
第5図はRAMに書込まれたC1カバレージ指標を読出
すための動作を説明するフロー図である。 図において、1は実l1lcPU、2は命令デコーダ、
3.5.13.14はANDゲート、4はフリップ70
ツブ、7はアドレスレジスタ、8.10はレジスタ、9
は加算回路、11は比較回路、12はマルチプレクサ、
15.16はORゲート、17はAND、1BはCPU
、21はコントロール回路を示す。 特許出願人 立石電機株式会社
FIG. 1 is a schematic block diagram of an embodiment of the present invention. FIG. 2 is a flow diagram of an example of a program to be tested according to an embodiment of the present invention. Figures 3 to 5
The figure is a flowchart for explaining the specific operation of one embodiment of the present invention. In particular, the 353rd RA shown in the 2nd
FIG. 4 is a flowchart for explaining the operation when initially determining M, and FIG. 4 is a flowchart for explaining the operation for collecting the C1 coverage index written in the RAM.
FIG. 5 is a flow diagram illustrating the operation for reading the C1 coverage index written in the RAM. In the figure, 1 is a real l1lcPU, 2 is an instruction decoder,
3.5.13.14 is AND gate, 4 is flip 70
Tsubu, 7 is address register, 8.10 is register, 9
is an adder circuit, 11 is a comparison circuit, 12 is a multiplexer,
15.16 is OR gate, 17 is AND, 1B is CPU
, 21 indicates a control circuit. Patent applicant Tateishi Electric Co., Ltd.

Claims (1)

【特許請求の範囲】 複数の分岐命令を含むプログラムにおいて、前記プログ
ラムを実行したときに前記分岐命令が正常に実行された
か否かを示すC1カバレージ指標を収束するだめのプロ
グラムテスト装置であって、前記プログラムを実行した
ときに、前記分岐命令とその分岐命令によって指定され
る次の命令に対応するアドレスデータまたはジャンプ先
のアドレスデータを出力するための中央処理手段、前記
中央処理手段が前記分岐命令を実行したときに出力する
データをデコードするためのデコーダ、 前記デコーダの前記分岐命令のデコードに応じて、前記
中央処理手段から出力された前記分岐命令のアドレスデ
ー々とその分岐命令によってジャンプする行先のアト1
ノスデータとを記憶するアドレスデータ記憶手段、 前記アドレスデータ記憶手段に記憶したジャンプする行
先のアドレスデータが予め定める分岐先に進んだことを
表わすアドレスデータに一致しているか否かを判別する
判別手段、および前記判別手段出力に基づいて、予め定
める分岐先に進んだか否かを表わす2値信号を記憶する
2値信号記憶手段を備えた、プログラムテスト装置。
[Scope of Claim] A program test device for converging a C1 coverage index indicating whether or not the branch instruction is normally executed when the program is executed in a program including a plurality of branch instructions, comprising: a central processing means for outputting address data corresponding to the branch instruction and the next instruction specified by the branch instruction or address data of a jump destination when the program is executed; a decoder for decoding data output when the decoder decodes the branch instruction; address data of the branch instruction output from the central processing means and a destination to be jumped by the branch instruction; Atto 1
address data storage means for storing Nos. data; determining means for determining whether address data of a jump destination stored in the address data storage means matches address data indicating that the jump destination has proceeded to a predetermined branch destination; and a binary signal storage means for storing a binary signal representing whether or not a predetermined branch destination has been reached based on the output of the discrimination means.
JP58035040A 1983-03-03 1983-03-03 Program testing device Pending JPS59160249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58035040A JPS59160249A (en) 1983-03-03 1983-03-03 Program testing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58035040A JPS59160249A (en) 1983-03-03 1983-03-03 Program testing device

Publications (1)

Publication Number Publication Date
JPS59160249A true JPS59160249A (en) 1984-09-10

Family

ID=12430927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58035040A Pending JPS59160249A (en) 1983-03-03 1983-03-03 Program testing device

Country Status (1)

Country Link
JP (1) JPS59160249A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6177943A (en) * 1984-09-26 1986-04-21 Hitachi Electronics Eng Co Ltd Program pass address tracing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6177943A (en) * 1984-09-26 1986-04-21 Hitachi Electronics Eng Co Ltd Program pass address tracing device

Similar Documents

Publication Publication Date Title
EP0528585B1 (en) Data processing system with internal instruction cache
EP0241946B1 (en) Information processing system
US5845064A (en) Method for testing and verification of a CPU using a reference model
US5347647A (en) Method of predicting the performance of an emulated computer system
US5134701A (en) Test apparatus performing runtime replacement of program instructions with breakpoint instructions for processor having multiple instruction fetch capabilities
US6691270B2 (en) Integrated circuit and method of operation of such a circuit employing serial test scan chains
JPH11110254A (en) Exception identification device and method for software debugging
JPS58222355A (en) Logic simulation machine
EP0199009A2 (en) Path coverage measuring system in a programme
CA1171968A (en) Microprocessor architecture having internal access means
US7376820B2 (en) Information processing unit, and exception processing method for specific application-purpose operation instruction
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JPH11110255A (en) Software debugging device and method
JPS59160249A (en) Program testing device
US7100027B1 (en) System and method for reproducing system executions using a replay handler
JPH11353205A (en) Processor built-in trace memory
US6986110B1 (en) Automated method and system for backtracing of instruction parameters from specified instruction in test cases
JPS59160248A (en) Program testing device
JPS6011943A (en) Inspection system for test program
JPS59160247A (en) Program testing device
JPS59158452A (en) Program test device
JPS60164842A (en) Instruction prefetching device
US20040107388A1 (en) Microcomputer
JPS59158451A (en) Program test device
JPS59161747A (en) Program analyzer