JPS59158450A - Program test device - Google Patents

Program test device

Info

Publication number
JPS59158450A
JPS59158450A JP58033614A JP3361483A JPS59158450A JP S59158450 A JPS59158450 A JP S59158450A JP 58033614 A JP58033614 A JP 58033614A JP 3361483 A JP3361483 A JP 3361483A JP S59158450 A JPS59158450 A JP S59158450A
Authority
JP
Japan
Prior art keywords
program
memory
instruction
data
cpu
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
JP58033614A
Other languages
Japanese (ja)
Inventor
Yoshinori Takahashi
義則 高橋
Haruo Takagi
高木 治夫
Makoto Kawai
川井 信
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 JP58033614A priority Critical patent/JPS59158450A/en
Publication of JPS59158450A publication Critical patent/JPS59158450A/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
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

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 collect especially a C0 index among test coverage indexes by such as designating the address for the instruction of a program with an address signal outputted from a CPU when executing a test program by the CPU. CONSTITUTION:A program to be tested is stored in an ROM2. A CPU1 reads sequentially an instruction stored in the ROM2 with address designation. This data is given to a memory 23 and logical 1 value is written in a corresponding byte. When an instruction in the program of the ROM2 is executed in this way, the information representing which instruction of the program is executed, i.e., the C0 index is stored in the memory 23 by writing ''1'' to the corresponding byte in the memory 23. When the collection of data, i.e., the execution of test case is all finished, the data (C0 index) stored in the memory 23 is read and collected and displayed via a CPU22.

Description

【発明の詳細な説明】 発明の分野 この発明は、プログラムテスト装置に関し、特にたとえ
ばプログラムのテスト(またはデバッグ)の完全性をチ
ェックするための装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a program testing device, and more particularly to a device for checking the integrity of, for example, testing (or debugging) a program.

先行技術の説明 一般に、プログラム作成後にプログラムをテストする場
合、様々なテストケースを用いてテスト対象となるプロ
グラムを実行させて動作を確認することが行なわれてい
る。このときに、プログラム中で実際に実行された部分
と実行されなかった部分を明確にすることは、テストの
完全性をチェックする上で非常に重要なことである。そ
のため、テスト・カバレージ指標(test  cov
erage  l1easure )を用いてテスト(
またはデバッグ)の完全性を示すことが提案されている
。ところが、従来このようなテスト・カバレージ指標を
収集できるような装置がなかった。特に、テストすべき
プログラムを実機を用いて、実時間で走行させてテス]
・・カバレージ指標を収集できるような装置がなかった
Description of Prior Art Generally, when testing a program after it has been created, the program to be tested is executed using various test cases to check its operation. At this time, it is very important to clarify the parts of the program that were actually executed and the parts that were not executed in order to check the completeness of the test. Therefore, the test coverage metric (test cov
test (
or debugging) is proposed. However, until now there has been no equipment capable of collecting such test coverage indicators. In particular, test the program to be tested by running it in real time on an actual machine]
...There was no equipment that could collect coverage indicators.

発明の目的 それゆえに、この発明は、テスト・カバレージ指標のう
ち特にCo指標(プログラム中の全ステートメントを実
行したか?)が収集できるようなプログラムテスト装置
を提供することを目的とする。
OBJECTS OF THE INVENTION Therefore, it is an object of the present invention to provide a program testing device that can collect the Co index (Have all statements in the program been executed?) among the test coverage indexes.

発明の構成および効果 この発明は、要約すれば、テストすべきプログラムを中
央処理装置で実行させる際、中央処理装置から出力され
るアドレス信号でプログラムの各命令をアドレス指定す
るとともに、各命令に対応する記憶領域を有しかつそれ
ぞれの記憶領域が少なくとも1ビツト数で構成される記
憶手段の対応の記憶領域をアドレス指定し、そのアドレ
ス指定された記憶領域に所定の情報(対応の命令が実行
されたことを表わす情報)を書込むようにしたものであ
る。
Structure and Effects of the Invention In summary, when a program to be tested is executed by a central processing unit, each instruction of the program is addressed by an address signal output from the central processing unit, and each instruction is A corresponding storage area of a storage means having a storage area of at least 1 bit, each storage area consisting of at least one bit, is addressed, and predetermined information (corresponding instruction is executed) is stored in the addressed storage area. The system is designed to write information (information indicating what happened).

この発明によれば、Co指標が収集でき、テスト(また
はデバッグ)の完全性を容易にチェックすることができ
る。また、この発明では、実機を用いてCO指標の収集
が行なえる。さらに、中央処理装置がテストすべきプロ
グラムを実行中に実時間でCo指標が収集できる。
According to this invention, Co metrics can be collected and the integrity of testing (or debugging) can be easily checked. Furthermore, in the present invention, CO indicators can be collected using an actual device. Furthermore, the Co index can be collected in real time while the central processing unit is executing the program to be tested.

実施例の説明 第1図はこの発明の一実施例を示すブロック図である。Description of examples FIG. 1 is a block diagram showing one embodiment of the present invention.

構成において、ROM2には、テストすべきプログラム
が記憶されている。このROM2は、アドレスバスAB
1を介してCPU1と接続される。CPU1はROM2
から順次プログラム中の命令を読出してその実行を行な
う。アドレスバスAB1はまたマルチプレクサ21に与
えられる。このマルチプレクサ21には、さらにアドレ
スバスAB2を介してCPU22が接続される。
In the configuration, the ROM 2 stores a program to be tested. This ROM2 has address bus AB
It is connected to CPU1 via 1. CPU1 is ROM2
The instructions in the program are sequentially read out and executed. Address bus AB1 is also provided to multiplexer 21. A CPU 22 is further connected to this multiplexer 21 via an address bus AB2.

すなわち、マルチプレクサ21はアドレスバスAB1に
出力されたアドレスとアドレスバスAB2に出力された
アドレスとを切換える。マルチプレクサ21の出力はメ
モリ23に与えられる。このメモリ23は1バイ1〜が
1ビツトで構成された複数のバイト(たとえば64にバ
イト)を含む。メモリ23の各パイ1〜は、ROM2に
含まれる各バイトと対応しており、対応のアドレスが割
当てられる。したがって、CPU1からアドレスバスA
B1にアドレスデータが出力されると、ROM2では成
るバイトに記憶された命令がアドレス指定され、メモリ
23ではその命令に対応するバイトがアドレス指定され
る。メモリ23のライトイネーブル(W>端子には、O
Rゲート24を介してコントロール回路25の出力が与
えられる。このコントロール回路25は、CPU1から
出力されるラン信@(プログラムを実行していることを
表わす信号)とアクセス可能信@(CPU1がROM2
をアクセスするタイミングを表わす信号)との論理積を
どるANDゲートなどを含む。また、メモリ23のデー
タ入力端子(IN)には、CPU22から出力されるク
リア書込指令信りが与えられる。このクリア書込指令信
号はORゲート24を介して上述のライトイネーブル端
子にも与えられる。メモリ23の出力端子(OUT)は
、CP 1.J 22に接続されたデータバスDB2に
接続される。
That is, multiplexer 21 switches between the address output to address bus AB1 and the address output to address bus AB2. The output of multiplexer 21 is given to memory 23. This memory 23 includes a plurality of bytes (for example, 64 bytes) each consisting of one bit. Each pie 1 to 1 in the memory 23 corresponds to each byte included in the ROM 2, and a corresponding address is assigned. Therefore, from CPU1 to address bus A
When address data is output to B1, the instruction stored in the corresponding byte is addressed in the ROM 2, and the byte corresponding to the instruction is addressed in the memory 23. Write enable of memory 23 (W> terminal is O
The output of the control circuit 25 is applied via the R gate 24. This control circuit 25 receives a run signal @ (a signal indicating that the program is being executed) output from the CPU 1 and an access enable signal @ (a signal indicating that the CPU 1 is running the ROM 2).
This includes an AND gate that performs a logical product with a signal representing the timing of accessing the data. Further, a clear write command signal output from the CPU 22 is applied to the data input terminal (IN) of the memory 23 . This clear write command signal is also applied to the above-mentioned write enable terminal via the OR gate 24. The output terminal (OUT) of the memory 23 is CP1. J22 is connected to data bus DB2.

5− 第2図は第1図に示すCPU22の動作を説明するため
のフローチャートである。以下、この第2図を参照して
第1図の実施例の動作について説明する。
5- FIG. 2 is a flowchart for explaining the operation of the CPU 22 shown in FIG. 1. The operation of the embodiment shown in FIG. 1 will be explained below with reference to FIG.

まず、ステップ(図示ではSと略す)1において、メモ
リ23がクリアされる。そし、ステップ2において、C
o指標の収集指示が行なわれる。
First, in step (abbreviated as S in the figure) 1, the memory 23 is cleared. Then, in step 2, C
o An instruction to collect indicators is given.

続いて、ステップ3において、cpuiに、ROM2に
記憶されたテストすべきプログラムの実行を開始させる
。したがって、CPUIはアドレスバスABIに順次ア
ドレスデータを出力し、ROM2に記憶されたプログラ
ムが含む命令を順次アドレス指定して読出す。
Subsequently, in step 3, the CPU is caused to start executing the program to be tested stored in the ROM2. Therefore, the CPUI sequentially outputs address data to the address bus ABI, and sequentially addresses and reads instructions included in the program stored in the ROM2.

次に、ステップ4において、CPU1から出力されたア
ドレスデータがマルチプレクサ21を介してメモリ23
に与えられ、メモリ23の対応のバイトに論理1−1」
が書込まれる。このときの動作をさらに詳細に説明する
と、CPU1からのアドレスデータの出力に同期して、
コントロール回路25はハイレベルの信号を出力する。
Next, in step 4, the address data output from the CPU 1 is sent to the memory 23 via the multiplexer 21.
and logical 1-1 in the corresponding byte of memory 23.
is written. To explain the operation at this time in more detail, in synchronization with the output of address data from CPU1,
The control circuit 25 outputs a high level signal.

このハイ−6= レベルの信号はORゲート24を介してメモリ23のラ
イトイネーブル端子(W>に与えられ、メモリ23を書
込み可能状態とプる。このとき、メモリ23の入力端子
(IN)はローレベルとなっている。ここで、メモリ2
3は入力端子(IN)がローレベルのときは、アドレス
指定されたバイトに論理「1」が書込まれ、逆に入力端
’j’ (IN)がハイレベルのときは、アドレス指定
されたバイトに論理rOJが書込まれるように構成され
ている。上述の場合、入力端子(IN)はローレベルと
なっているため、CPLllからのアドレスデータによ
って指定されるメモリ23の対応のバイトには、論理「
1」が書込まれる。このように、ROM2のプログラム
中の成る命令が実行されると、メモリ23の対応のバイ
トに論理「1」が書込まれる。また、実行されていない
命令に対応するバイト(メモリ23中の)は論理「0」
のままである。したがって、メモリ23には、プログラ
ム中のいずれの命令が実行されたかを示す情報、すなわ
ちCo指標が記憶される。
This high-6=level signal is applied to the write enable terminal (W>) of the memory 23 via the OR gate 24, making the memory 23 ready for writing.At this time, the input terminal (IN) of the memory 23 is It is low level.Here, memory 2
3, when the input terminal (IN) is at low level, logic "1" is written to the addressed byte, and conversely, when the input terminal 'j' (IN) is at high level, the addressed byte is written. A logical rOJ is configured to be written to the byte. In the above case, since the input terminal (IN) is at a low level, the corresponding byte of the memory 23 specified by the address data from the CPLll has a logic "
1" is written. In this way, when an instruction in the program of the ROM 2 is executed, a logic "1" is written to the corresponding byte of the memory 23. Also, bytes (in memory 23) corresponding to unexecuted instructions are logic "0"
It remains as it is. Therefore, the memory 23 stores information indicating which instruction in the program has been executed, that is, the Co index.

次に、ステップ5に進み、CPU1の動作を停止させる
。続いて、ステップ6において、データの収集が完了し
たか否か、すなわちテストケースをすべて実行し終えた
か否かが判断される。データの収集が完了していな【プ
れば、すなわち実行されていないデス1−ケースがまだ
あれば、再びステップ3以下の動作が繰返される。デー
タの収集が完了すれば、すなわちテストケースの実行が
すべて終了すれば、ステップ7に進み、メモリ23に記
憶されたデータ(Co指標)が読出される。このとき、
マルチプレクサ21はアドレスバスAS2側に切換えら
れる。したがって、メモリ23はCPU22から出力さ
れるアドレスデータに基づいてアドレス指定される。メ
モリ23の出力端子(OUT)から出力される1ビツト
データは、データバスDB2を介してCPU22に読込
まれる。
Next, the process proceeds to step 5, where the operation of the CPU 1 is stopped. Subsequently, in step 6, it is determined whether data collection has been completed, that is, whether all test cases have been executed. If the data collection is not completed, that is, if there are still unexecuted cases, the operations from step 3 onwards are repeated again. When data collection is completed, that is, when all test cases have been executed, the process proceeds to step 7, and the data (Co index) stored in the memory 23 is read out. At this time,
Multiplexer 21 is switched to the address bus AS2 side. Therefore, the memory 23 is addressed based on the address data output from the CPU 22. 1-bit data output from the output terminal (OUT) of the memory 23 is read into the CPU 22 via the data bus DB2.

次に、ステップ8に進み、CPU22はメモリ23から
読出したデータすなわちCo指標を集計し、図示しない
表示装置などに出力して表示させる。
Next, the process proceeds to step 8, where the CPU 22 aggregates the data read from the memory 23, that is, the Co index, and outputs the data to a display device (not shown) for display.

なお、集計したCo指標は第3図に示すように、印字し
てもよい。
Note that the totalized Co index may be printed as shown in FIG.

なお、メモリ23に記憶されたデータをクリアする場合
は、CPU22からハイレベルのクリア書込指令信号が
出力される。このクリア書込指令信号によって、メモリ
23のライトイネーブル端子(W>がハイレベルになり
、また入力端子(IN)がハイレベルになる。さらに、
CPU22はアドレスバスAB2にアドレスデータを出
力する。
Note that when clearing the data stored in the memory 23, a high-level clear write command signal is output from the CPU 22. This clear write command signal causes the write enable terminal (W> of the memory 23 to go high, and the input terminal (IN) to go high.Furthermore,
CPU22 outputs address data to address bus AB2.

このアドレスデータによってメモリ23の各バイトは順
次アドレス指定される。このとき、メモリ23の入力端
子(IN)がハイレベルのため、前述のようにメモリ2
3においてアドレス指定されたバイトには、論理「0」
が書込まれる。
Each byte of memory 23 is sequentially addressed by this address data. At this time, since the input terminal (IN) of the memory 23 is at a high level, the memory 23
The byte addressed in 3 has a logic '0'
is written.

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

第1図はこの発明の一実施例を示すブロック図である。 第2図は第1図に示すCPU22の動作を説明するため
のフローチャートである。第3図はCo指標の一印字例
を示す図である。 図において、1はテストすべきプログラムを実−〇− 行するCPU、2はテストすべきプログラムを記憶する
ROM121はマルチプレクサ、22はCo指標の収集
動作を行なうCPU123はCo指標を記憶するメモリ
、25はコントロール回路を示ブー。 特許出願人 立石電機株式会社 10−
FIG. 1 is a block diagram showing one embodiment of the present invention. FIG. 2 is a flowchart for explaining the operation of the CPU 22 shown in FIG. FIG. 3 is a diagram showing an example of printing of the Co index. In the figure, 1 is a CPU that executes a program to be tested, 2 is a ROM 121 that stores a program to be tested, is a multiplexer, 22 is a CPU 123 that performs a Co index collection operation, is a memory that stores a Co index, 25 shows the control circuit. Patent applicant Tateishi Electric Co., Ltd. 10-

Claims (1)

【特許請求の範囲】 テストすべきブロクラムを記憶するプログラム記憶手段
、 前記テストすべきプログラムに含まれる各命令を順次読
出して実行する中央処理装置、前記各命令に対応する記
憶領域を有し、それぞれの記憶領域が少なくとも1ビツ
ト数で構成される記憶手段、 前記各命令をアドレス指定するための前記中央処理装置
から出力されるアドレス信号に基づいて、前記記憶手段
の対応の記憶領域をアドレス指定する手段、および 前記アドレス指定手段によってアドレス指定された前記
記憶手段の記憶領域に、対応の前記命令が実行されたこ
とを表わす情報を書込む手段を備える、プログラムテス
ト装置。
[Scope of Claims] A program storage means for storing a program to be tested, a central processing unit for sequentially reading and executing each instruction included in the program to be tested, and a storage area corresponding to each of the instructions, each of which includes: A storage means having a storage area of at least one bit, and addressing a corresponding storage area of the storage means based on an address signal output from the central processing unit for addressing each of the instructions. and means for writing information indicating that the corresponding instruction has been executed into a storage area of the storage means addressed by the addressing means.
JP58033614A 1983-02-28 1983-02-28 Program test device Pending JPS59158450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58033614A JPS59158450A (en) 1983-02-28 1983-02-28 Program test device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58033614A JPS59158450A (en) 1983-02-28 1983-02-28 Program test device

Publications (1)

Publication Number Publication Date
JPS59158450A true JPS59158450A (en) 1984-09-07

Family

ID=12391330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58033614A Pending JPS59158450A (en) 1983-02-28 1983-02-28 Program test device

Country Status (1)

Country Link
JP (1) JPS59158450A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6175440A (en) * 1984-09-19 1986-04-17 Omron Tateisi Electronics Co Program quality evaluating device
JPS6231433A (en) * 1985-08-03 1987-02-10 Nec Corp Detector for no-run step of microprogram
CN111651350A (en) * 2020-05-29 2020-09-11 泰康保险集团股份有限公司 Test case processing method, device and equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55118157A (en) * 1979-03-06 1980-09-10 Hitachi Ltd Program tracing system
JPS5710846A (en) * 1980-06-25 1982-01-20 Hitachi Ltd Information processing equipment
JPS5733759A (en) * 1980-08-08 1982-02-23 Hitachi Ltd Flow rate controller for air conditioner

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55118157A (en) * 1979-03-06 1980-09-10 Hitachi Ltd Program tracing system
JPS5710846A (en) * 1980-06-25 1982-01-20 Hitachi Ltd Information processing equipment
JPS5733759A (en) * 1980-08-08 1982-02-23 Hitachi Ltd Flow rate controller for air conditioner

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6175440A (en) * 1984-09-19 1986-04-17 Omron Tateisi Electronics Co Program quality evaluating device
JPS6231433A (en) * 1985-08-03 1987-02-10 Nec Corp Detector for no-run step of microprogram
CN111651350A (en) * 2020-05-29 2020-09-11 泰康保险集团股份有限公司 Test case processing method, device and equipment and computer readable storage medium
CN111651350B (en) * 2020-05-29 2024-03-08 泰康保险集团股份有限公司 Test case processing method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
JPS59158450A (en) Program test device
JP3432734B2 (en) DMA control device and DMA control method
JP2007058450A (en) Semiconductor integrated circuit
JP2878264B1 (en) Tracer device, trace data compression method, and compressed trace data reading method
CN112885403A (en) Function test method, device and equipment of Flash controller
US5515527A (en) Method and system for measuring branch passing coverage in microprogram by use of memories for holding program addresses of instructions currently and latest executed for use in logic simulator
JP2557102B2 (en) Method for checking large capacity RAM and its peripheral circuits
JPH1040130A (en) Microcomputer
JPS59197946A (en) Memory device
JPH0581087A (en) Processor monitoring system
JPS6011953A (en) Memory device
JP2876909B2 (en) Interrupt emulator
JPH0883200A (en) Programmable controller
JP2004348635A (en) Method for developing program
JPS60549A (en) Memory testing system
JPS6375848A (en) Debugging log recording system
JPS6212541B2 (en)
JPS59163653A (en) Debug device
JPH04359326A (en) History information recording system
JP2000222243A (en) Device and method for debugging
JPS59202551A (en) Program analyzer
JPS6227421B2 (en)
JPH0512071A (en) Trace circuit
JPH0793039B2 (en) Memory address control circuit
JPH03265037A (en) Large capacity memory initial diagnostic control system