JP2014063346A - Information processor - Google Patents

Information processor Download PDF

Info

Publication number
JP2014063346A
JP2014063346A JP2012207976A JP2012207976A JP2014063346A JP 2014063346 A JP2014063346 A JP 2014063346A JP 2012207976 A JP2012207976 A JP 2012207976A JP 2012207976 A JP2012207976 A JP 2012207976A JP 2014063346 A JP2014063346 A JP 2014063346A
Authority
JP
Japan
Prior art keywords
branch
address
data
memory
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
JP2012207976A
Other languages
Japanese (ja)
Inventor
Shinichi Kiyota
信一 清田
Keiko Tsumu
圭子 紡車
Katsuyuki Uemori
勝之 植盛
Takeshi Murakami
剛 村上
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2012207976A priority Critical patent/JP2014063346A/en
Publication of JP2014063346A publication Critical patent/JP2014063346A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To suppress an increase in a memory capacity for storing trace data of coverage measurement.SOLUTION: While executing a program including a plurality of branch instructions, an input part 107 inputs branch source data and corresponding branch destination data of each branch instruction each time the branch instruction is executed. A control part 110 stores the branch source data to be inputted about a branch instruction to be executed at the next position of the branch instruction in an address designation area of a memory 101 for coverage measurement based on the branch destination data of the branch instruction inputted by the input part.

Description

本発明は情報処理装置に関し、たとえば、対象プログラム中の命令をどれくらい実行したかを検出する情報処理装置に利用できるものである。   The present invention relates to an information processing apparatus, and can be used, for example, in an information processing apparatus that detects how many instructions in a target program have been executed.

マイクロコンピュータの1種であるMCU(Micro Computer Unit)が家電などの各種電気機器に組み込まれるようになり、MCUに内蔵されるソフトウェアが有するバグを見つけ出し修正するデバッグ工程は重要である。デバッグ工程では、プログラムが適切に動作するかをチェックするために、ICE(In-Circuit Emulator)等のエミュレータをMCUに接続して、プログラム実行中のMCU内の各部の状態をICEによりモニタする。   An MCU (Micro Computer Unit), which is a kind of microcomputer, has been incorporated into various electrical devices such as home appliances, and a debugging process for finding and correcting bugs in software built in the MCU is important. In the debugging process, an emulator such as an ICE (In-Circuit Emulator) is connected to the MCU in order to check whether the program operates properly, and the state of each part in the MCU that is executing the program is monitored by the ICE.

モニタする項目の1つに、プログラムのトレースデータから、プログラム内の分岐命令によって実行された命令の当該プログラムに占める割合を検出する、いわゆるプログラムのカバレッジ率の計測がある。たとえば、特許文献1(特開2004−21939号公報)には、プログラム実行時にMCUから出力されるトレースデータに含まれる全ての分岐元/分岐先アドレスを一旦ICE内のメモリに記録する。そして、プログラム実行終了後に記録された分岐情報をソフトウェアにより解析し、解析結果から分岐率を算出する。   One of the items to be monitored is measurement of a so-called program coverage rate in which the ratio of instructions executed by branch instructions in the program to the program is detected from the trace data of the program. For example, in Patent Document 1 (Japanese Patent Application Laid-Open No. 2004-21939), all branch source / branch destination addresses included in trace data output from an MCU during program execution are temporarily recorded in a memory in the ICE. Then, the branch information recorded after the program execution is completed is analyzed by software, and the branch rate is calculated from the analysis result.

特開2004−21939号公報JP 2004-21939 A

また、カバレッジ率を計測するためにトレースデータを記録する場合に、トレースデータをMCUからホストコンピュータ内の大容量メモリに直接転送することができないとき(たとえば、転送帯域が確保できないようなとき)には、通常トレースデータをMCUからエミュレータが備えるメモリに転送して記録する。しかし、エミュレータに搭載可能なメモリはホストコンピュータに比較して圧倒的に容量が小さいため、長時間のプログラム実行などによりトレースデータ量が多くなると、エミュレータのメモリではトレースデータの上書き記録が発生し、カバレッジ率を計測することができないという問題があった。   Also, when recording trace data to measure the coverage rate, when the trace data cannot be transferred directly from the MCU to the large-capacity memory in the host computer (for example, when the transfer bandwidth cannot be secured) The normal trace data is transferred from the MCU to a memory provided in the emulator and recorded. However, since the memory that can be installed in the emulator is overwhelmingly small compared to the host computer, if the amount of trace data increases due to long-time program execution, etc., overwriting recording of trace data occurs in the emulator memory, There was a problem that the coverage rate could not be measured.

特許文献1は、トレース高速化とトレースパケット数削減を図るためのトレースデータの選択出力や分岐情報の圧縮や復元方法を開示するが、トレースデータを記憶するためのメモリ容量削減の方法は何ら開示しない。   Patent Document 1 discloses a method of selecting and outputting trace data and compressing and restoring branch information for increasing the trace speed and reducing the number of trace packets, but discloses a method for reducing the memory capacity for storing trace data. do not do.

それゆえに、対象プログラムのカバレッジ計測に係るトレースデータを格納するためのメモリ容量増加を抑制する情報処理装置の提供が望まれる。   Therefore, it is desired to provide an information processing apparatus that suppresses an increase in memory capacity for storing trace data related to coverage measurement of a target program.

その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.

本発明の一実施形態では、情報処理装置は、複数の分岐命令を含むプログラムを実行時に、分岐命令が実行される毎に当該分岐命令の分岐元データと対応の分岐先データとを入力する入力部と、複数の分岐命令に関するデータを格納するためのメモリと、メモリのアクセスを制御するための制御部と、を備える。制御部は、入力部が入力する分岐命令の分岐先データに基づくメモリのアドレス指定領域に、当該分岐命令の次位に実行される分岐命令について入力する分岐元データを格納する。   In one embodiment of the present invention, when an information processing apparatus executes a program including a plurality of branch instructions, an input for inputting branch source data of the branch instruction and corresponding branch destination data each time the branch instruction is executed And a memory for storing data relating to a plurality of branch instructions, and a control unit for controlling access to the memory. The control unit stores branch source data to be input for a branch instruction to be executed next to the branch instruction in the addressing area of the memory based on the branch destination data of the branch instruction input by the input unit.

本発明の一実施形態の情報処理装置は、対象プログラムのカバレッジ計測に係るトレースデータを格納するために必要なメモリ容量が増加するのを抑制する。   An information processing apparatus according to an embodiment of the present invention suppresses an increase in memory capacity necessary for storing trace data related to coverage measurement of a target program.

本発明の実施の形態1に係るシステムの概略構成図である。It is a schematic block diagram of the system which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るホストコンピュータのハードウェア構成図である。It is a hardware block diagram of the host computer which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るエミュレータのハードウェア構成とパケット構成を示す図である。It is a figure which shows the hardware constitutions and packet structure of the emulator which concern on Embodiment 1 of this invention. 本発明の実施の形態1に係るカバレッジ計測のためのメイン処理のフローチャートである。It is a flowchart of the main process for the coverage measurement which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るカバレッジ計測用メモリへのデータ記録処理のフローチャートである。It is a flowchart of the data recording process to the memory for coverage measurement which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るカバレッジ計測に係る解析処理のフローチャートである。It is a flowchart of the analysis process which concerns on the coverage measurement which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るカバレッジ計測用メモリの格納データを説明する図である。It is a figure explaining the storage data of the memory for coverage measurement which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る対象プログラムと、カバレッジ計測用メモリの格納データとを模式的に示す図である。It is a figure which shows typically the object program which concerns on Embodiment 1 of this invention, and the storage data of the memory for coverage measurement. 本発明の実施の形態に係る解析処理の具体例を示す図である。It is a figure which shows the specific example of the analysis process which concerns on embodiment of this invention. 本発明の実施の形態2に係る対象プログラムと、カバレッジ計測用メモリの格納データとを模式的に示す図である。It is a figure which shows typically the object program which concerns on Embodiment 2 of this invention, and the storage data of the memory for coverage measurement. 本発明の実施の形態2に係るエミュレータの動作を示すタイミングチャートである。6 is a timing chart showing an operation of the emulator according to the second embodiment of the present invention. 本発明の実施の形態3に係る対象プログラムから対象外プログラムへの分岐を説明する図である。It is a figure explaining the branch from the target program which concerns on Embodiment 3 of this invention to a non-target program. 本発明の実施の形態3に係るエミュレータの概略構成図である。It is a schematic block diagram of the emulator which concerns on Embodiment 3 of this invention.

以下、図面を参照しつつ、発明の各実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

本実施の形態では、アドレス指定されてアクセス(データの読出/書込み)される領域を“アドレス領域”と称する。アドレス指定のために用いるデータを“アドレス”と称する。アドレス指定に用いるアドレスはヘキサデシマル(16進法)に従う値を示す。本実施の形態では、“アドレス値”という場合には、このヘキサデシマルの値を示す。なお、アドレスの表現はヘキサデシマルに従う表現に限定されない。   In the present embodiment, an addressed and accessed (data read / write) area is referred to as an “address area”. Data used for addressing is referred to as “address”. The address used for addressing indicates a value according to hexadecimal (hexadecimal). In this embodiment, the “address value” indicates this hexadecimal value. The address expression is not limited to the expression according to hexadecimal.

また、“カバレッジ”(または、カバレッジ率)は、対象プログラムの全命令文(プログラムコード)について、対象プログラムの実行時に、どれくらい実行されたかを示す値であり、いわゆるC0カバレッジと呼ばれる。   “Coverage” (or coverage rate) is a value indicating how much of all the command statements (program code) of the target program is executed when the target program is executed, and is called so-called C0 coverage.

[実施の形態1]
<システム構成>
図1は、本発明の実施の形態1に係るシステムの概略構成図である。図1を参照して、システムは、情報処理装置に相当するICEなどのエミュレータ100、エミュレータ100にデータ伝送路であるバス500を介し接続されるMCU200、およびエミュレータ100にケーブル400を介し接続されるホストコンピュータ300を備える。エミュレータ100は、ICEなどの情報処理装置に相当する。
[Embodiment 1]
<System configuration>
FIG. 1 is a schematic configuration diagram of a system according to Embodiment 1 of the present invention. Referring to FIG. 1, the system is connected to emulator 100 such as ICE corresponding to an information processing apparatus, MCU 200 connected to emulator 100 via bus 500 serving as a data transmission path, and to emulator 100 via cable 400. A host computer 300 is provided. The emulator 100 corresponds to an information processing apparatus such as ICE.

ケーブル400の通信フォーマットは、たとえばUSB(Universal Serial Bus)を適用するが、USBに限定されない。また、エミュレータ100とホストコンピュータ300とは、ケーブル400による有線通信に限定されず、無線通信であってもよい。   The communication format of the cable 400 is, for example, USB (Universal Serial Bus), but is not limited to USB. Further, the emulator 100 and the host computer 300 are not limited to wired communication using the cable 400, and may be wireless communication.

MCU200は、基板上にCPU(Central Processing Unit)201、I/O回路202、データおよびプログラムを格納するための記憶部203、およびOCD回路204を備える。I/O回路202は、バス500が接続されてバス500とMCU200との間でのデータ入出力を制御する。これら各部は、通信用のバスを介して相互に接続される。   The MCU 200 includes a CPU (Central Processing Unit) 201, an I / O circuit 202, a storage unit 203 for storing data and programs, and an OCD circuit 204 on a substrate. The I / O circuit 202 is connected to the bus 500 and controls data input / output between the bus 500 and the MCU 200. These units are connected to each other via a communication bus.

記憶部203は、揮発性/不揮発性メモリ、ROM(Read Only Memory)およびRAM(Random Access Memory)などを含む。   The storage unit 203 includes a volatile / nonvolatile memory, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.

OCD(On Chip Debugging Emulator)回路204は、後述するパケットを生成しI/O回路202に出力する。I/O回路202は、OCD回路204からのパケットを含むデータを入力し、転送用フォーマット従い変換し、変換後のデータをバス500に出力する。   An OCD (On Chip Debugging Emulator) circuit 204 generates a packet to be described later and outputs it to the I / O circuit 202. The I / O circuit 202 receives data including a packet from the OCD circuit 204, converts the data according to the transfer format, and outputs the converted data to the bus 500.

<分岐命令に係る分岐元/分岐先データ>
本実施の形態では、カバレッジ率の計測対象プログラム(以下、対象プログラムという)は複数の分岐命令を含む。対象プログラムが実行されるときに分岐命令が実行されると、当該分岐命令の分岐元を示す分岐元データと、分岐先を示す分岐先データが検出される。
<Branch source / branch destination data related to branch instruction>
In the present embodiment, a coverage rate measurement target program (hereinafter referred to as a target program) includes a plurality of branch instructions. When a branch instruction is executed when the target program is executed, branch source data indicating the branch source of the branch instruction and branch destination data indicating the branch destination are detected.

具体的には、MCU200において、対象プログラムのプログラムコードは記憶部203の予め定められた記憶領域に格納される。プログラム実行時には、CPU201内の図示しないプログラムカウンタのカウント値に基づくアドレス指定により記憶部203の対象プログラム中の命令を読出し、読出した命令を実行する。命令が実行されると、プログラムカウンタのカウント値は、次位の命令を格納したアドレスを指示するようにインクリメントされる。CPU201は、インクリメント後のカウント値に基づくアドレス指定により次位の命令を読出し、読出した命令を実行する。これにより、記憶部203に格納される対象プログラムが実行される。   Specifically, in the MCU 200, the program code of the target program is stored in a predetermined storage area of the storage unit 203. When the program is executed, an instruction in the target program in the storage unit 203 is read by address designation based on a count value of a program counter (not shown) in the CPU 201, and the read instruction is executed. When the instruction is executed, the count value of the program counter is incremented to indicate the address where the next instruction is stored. The CPU 201 reads the next instruction by addressing based on the incremented count value, and executes the read instruction. Thereby, the target program stored in the storage unit 203 is executed.

対象プログラム実行時に、CPU201が、分岐命令を実行したとき、OCD回路204はCPU201−記憶部203間の図示しないバスを監視して分岐元データと分岐先データを取得する。ここでは、分岐元データは、分岐命令が格納されていたアドレスを示し、分岐先データは、分岐命令を実行したときにインクリメントされた後のプログラムカウンタのカウント値に基づくアドレスを示す。つまり、分岐先データ、分岐命令により分岐(jumpなど)した先の命令が格納されたアドレスを示す。   When the CPU 201 executes a branch instruction during execution of the target program, the OCD circuit 204 monitors a bus (not shown) between the CPU 201 and the storage unit 203 to acquire branch source data and branch destination data. Here, the branch source data indicates an address where the branch instruction is stored, and the branch destination data indicates an address based on the count value of the program counter after being incremented when the branch instruction is executed. In other words, it indicates the branch destination data and the address at which the branch destination instruction (jump etc.) is stored.

図2は、本発明の実施の形態1に係るホストコンピュータ300のハードウェア構成図である。図2を参照してホストコンピュータ300は一般的な情報処理装置に相当する。具体的には、CPU301、揮発/不揮発メモリ、ROM、RAMおよびハードディスクなどを含む記憶部302、ケーブル400が接続される通信部303、表示部304、タイマ305、および入力部306を備える。さらに、CD−ROM(Compact Disc Read Only Memory)308などの記録媒体が着脱自在に装着されて、装着される記録媒体をアクセスするためのI/F(Interface)307を備える。各部は、バスを介し通信する。記憶部302は、CPU301が解析するべきデータ(以下、解析データという)が格納される予め定められた記憶領域である解析用メモリ312を含む。また、入力部306は、マウス、キーボードなどによるユーザ操作を受付けて、受付けた操作内容に従う指令・データを入力する。   FIG. 2 is a hardware configuration diagram of the host computer 300 according to the first embodiment of the present invention. Referring to FIG. 2, host computer 300 corresponds to a general information processing apparatus. Specifically, a storage unit 302 including a CPU 301, volatile / nonvolatile memory, ROM, RAM, and hard disk, a communication unit 303 to which a cable 400 is connected, a display unit 304, a timer 305, and an input unit 306 are provided. Further, a recording medium such as a CD-ROM (Compact Disc Read Only Memory) 308 is detachably mounted, and an I / F (Interface) 307 for accessing the mounted recording medium is provided. Each unit communicates via a bus. The storage unit 302 includes an analysis memory 312 that is a predetermined storage area in which data to be analyzed by the CPU 301 (hereinafter referred to as analysis data) is stored. Further, the input unit 306 receives a user operation using a mouse, a keyboard, or the like, and inputs a command / data according to the received operation content.

ホストコンピュータ300とエミュレータ100間では、ケーブル400などによる通信ではなく、CD−ROM308などの記録媒体を介してデータ転送するとしてもよい。   Data may be transferred between the host computer 300 and the emulator 100 via a recording medium such as the CD-ROM 308 instead of communication using the cable 400 or the like.

なお、ホストコンピュータ300は図1のように据え置き型に限定されず、携帯型の情報処理端末であってもよい。   The host computer 300 is not limited to the stationary type as shown in FIG. 1, and may be a portable information processing terminal.

<エミュレータの構成およびパケット構成>
図3は、本発明の実施の形態1に係るエミュレータ100のハードウェア構成とパケット構成を示す図である。図3(A)のエミュレータ100は、バス500が接続される入力部107、不揮発性のRAMなどからなるカバレッジ計測用メモリ101、およびカバレッジ計測用メモリ101を制御するためのメモリ制御回路102を備える。これら回路に関連して、さらに、メモリアドレスレジスタ103、分岐元保持レジスタ104、分岐元アドレス値の大小比較をするための大小比較器105、および分岐先保持レジスタ106を備える。カバレッジ計測用メモリ101は、MCU200におけるプログラム実行に伴って出力されるトレースデータを記録するためのメモリであって、とりわけ分岐命令に関する情報(以降、分岐情報という)を格納するためのメモリである。
<Emulator configuration and packet configuration>
FIG. 3 is a diagram showing a hardware configuration and a packet configuration of the emulator 100 according to the first embodiment of the present invention. 3A includes an input unit 107 to which a bus 500 is connected, a coverage measurement memory 101 including a nonvolatile RAM, and a memory control circuit 102 for controlling the coverage measurement memory 101. . In relation to these circuits, a memory address register 103, a branch source holding register 104, a magnitude comparator 105 for comparing the magnitudes of branch source address values, and a branch destination holding register 106 are further provided. The coverage measurement memory 101 is a memory for recording trace data output as a result of program execution in the MCU 200, and is a memory for storing information related to branch instructions (hereinafter referred to as branch information).

メモリ制御回路102は、アドレス113によりカバレッジ計測用メモリ101をアドレス指定し、指定されたアドレス領域についてデータ114を読み書きする。   The memory control circuit 102 addresses the coverage measurement memory 101 with the address 113 and reads / writes the data 114 for the designated address area.

入力部107は、入力するデータを出力するために図示しないマルチプレクサを有する。   The input unit 107 includes a multiplexer (not shown) for outputting input data.

図3(B)には、トレースバス500を介し転送されるパケットのフィールド構成が示される。OCD回路204は、対象プログラムを実行時に、分岐命令が実行されると、当該分岐命令のためのパケットを生成する。CPU201は実行される命令コードの種類を判別し、分岐命令であると判定したときは、OCD回路204にパケット生成を指示するとともに、分岐命令に係る分岐元データおよび分岐先データを出力する。   FIG. 3B shows a field configuration of a packet transferred via the trace bus 500. When a branch instruction is executed when executing the target program, the OCD circuit 204 generates a packet for the branch instruction. When the CPU 201 determines the type of instruction code to be executed and determines that it is a branch instruction, the CPU 201 instructs the OCD circuit 204 to generate a packet and outputs branch source data and branch destination data related to the branch instruction.

図3(B)を参照しパケットは、当該パケットの種類、当該パケットの宛先/送信元などを示す情報HEを格納するためのヘッダフィルードおよび転送するべきデータを格納するためのデータフィルードを含む。データフィルードには、CPU201が出力する分岐元データ112および分岐先データ111がセット(組)で格納される。   With reference to FIG. 3B, the packet includes a header field for storing information HE indicating the type of the packet, the destination / source of the packet, and the like, and a data field for storing data to be transferred. In the data field, branch source data 112 and branch destination data 111 output from the CPU 201 are stored as a set.

エミュレータ100の入力部107は、MCU200からパケットを入力し、入力パケットの情報HEを解析する。解析結果に基づき、当該パケットの種類が分岐情報を格納したパケットであると検出すると、マルチプレクサを、当該パケットの分岐元データ112を大小比較器105へ出力し、分岐先データ111をメモリアドレスレジスタ103に出力するように制御する。   The input unit 107 of the emulator 100 inputs a packet from the MCU 200 and analyzes the information HE of the input packet. When it is detected that the packet type is a packet storing branch information based on the analysis result, the multiplexer outputs the branch source data 112 of the packet to the magnitude comparator 105 and the branch destination data 111 is stored in the memory address register 103. Control to output to.

ここでは、説明を簡単にするために、MCU200で対象プログラムが実行中は、分岐命令が実行される毎に、当該分岐命令のパケットがバス500を介しエミュレータ100に伝送されるとする。   Here, to simplify the description, it is assumed that a packet of a branch instruction is transmitted to the emulator 100 via the bus 500 every time a branch instruction is executed while the target program is being executed by the MCU 200.

<カバレッジ計測用メモリへの記録アルゴリズム>
図4は、本発明の実施の形態1に係るカバレッジ計測のためのメイン処理のフローチャートである。図4を参照して、メイン処理は、カバレッジ計測用メモリ101へのデータ記録処理(ステップT1)と、カバレッジ計測用メモリ101の記録データのカバレッジ計測に係る解析処理(ステップT2)とを含む。
<Recording algorithm to coverage measurement memory>
FIG. 4 is a flowchart of the main process for coverage measurement according to Embodiment 1 of the present invention. Referring to FIG. 4, the main processing includes data recording processing (step T1) in coverage measurement memory 101 and analysis processing (step T2) related to coverage measurement of recorded data in coverage measurement memory 101.

図5は、本発明の実施の形態1に係るカバレッジ計測用メモリ101へのデータ記録処理のフローチャートである。なお、カバレッジ計測用メモリ101のメモリアドレスそれぞれは、MCU200の記憶部203のプログラム記憶領域のアドレスに1対1に割付けられる。割付け後に、カバレッジ計測用メモリ101は初期化される。初期化では、全アドレス領域にゼロが格納される。これをゼロクリアという。   FIG. 5 is a flowchart of data recording processing to the coverage measurement memory 101 according to the first embodiment of the present invention. Note that each memory address of the coverage measurement memory 101 is assigned one-to-one to the address of the program storage area of the storage unit 203 of the MCU 200. After the allocation, the coverage measurement memory 101 is initialized. In initialization, zero is stored in the entire address area. This is called zero clear.

その後、MCU200で、対象プログラムが実行開始される。MCU200のOCD回路204は、当該プログラムの実行開始をエミュレータ100に通知する。エミュレータ100は、当該通知をバス500を介し入力すると、図5の処理を開始する。   Thereafter, the MCU 200 starts executing the target program. The OCD circuit 204 of the MCU 200 notifies the emulator 100 of the execution start of the program. When the emulator 100 inputs the notification via the bus 500, the emulator 100 starts the process of FIG.

ここでは、プログラムは先頭アドレスのプログラムコードから実行開始され、以降のアドレスのプログラムコードが順次に実行される。なお、実行開始アドレスは、先頭アドレスに固定されず、ユーザ指示に従い可変に変更できるとしてもよい。   Here, the program starts to be executed from the program code at the head address, and the program codes at the subsequent addresses are sequentially executed. Note that the execution start address is not fixed to the head address, but may be variably changed according to a user instruction.

エミュレータ100の入力部107は、バス500からパケットを入力すると(ステップS3)、パケットのデータ部の分岐先データ111が示すアドレス値をメモリアドレスレジスタ103に格納する(ステップS7)。   When the packet is input from the bus 500 (step S3), the input unit 107 of the emulator 100 stores the address value indicated by the branch destination data 111 of the data portion of the packet in the memory address register 103 (step S7).

メモリ制御回路102は、メモリアドレスレジスタ103に格納された値(アドレス値)に基づき、カバレッジ計測用メモリ101をアドレス指定する(ステップS9)。そして、指定アドレス領域からデータを読出し、読出したデータを分岐元保持レジスタ104に格納する(ステップS11)。これと同時に、メモリアドレスレジスタ103の内容を分岐先保持レジスタ106に転送する(ステップS13)。   The memory control circuit 102 addresses the coverage measurement memory 101 based on the value (address value) stored in the memory address register 103 (step S9). Then, the data is read from the designated address area, and the read data is stored in the branch source holding register 104 (step S11). At the same time, the contents of the memory address register 103 are transferred to the branch destination holding register 106 (step S13).

その後、入力部107により次位に実行される分岐命令のパケットを入力する(ステップS15)。   Thereafter, a packet of a branch instruction to be executed next is input by the input unit 107 (step S15).

大小比較器105は、入力パケットの分岐元データ112のアドレス値と分岐元保持レジスタ104の値(プログラム実行開始後の初回の比較では当該値はゼロを示す)とを比較する(ステップS17)。メモリ制御回路102は、比較結果に基づき、前者が後者より大きいと判定した場合には(ステップS19でYES)、分岐先保持レジスタ106の値(前回に入力したパケットの分岐先データ111が示す分岐先アドレス)に基づくカバレッジ計測用メモリ101のアドレス指定領域の値を、今回入力したパケットの分岐元データ112が示す分岐元アドレス値に書換える(ステップS21)。   The magnitude comparator 105 compares the address value of the branch source data 112 of the input packet with the value of the branch source holding register 104 (the value indicates zero in the first comparison after the start of program execution) (step S17). If the memory control circuit 102 determines that the former is larger than the latter based on the comparison result (YES in step S19), the value of the branch destination holding register 106 (the branch indicated by the branch destination data 111 of the packet input last time). The value of the address designation area of the coverage measurement memory 101 based on the destination address) is rewritten to the branch source address value indicated by the branch source data 112 of the packet input this time (step S21).

また、比較の結果から、入力する分岐元データ112が示すアドレス値は分岐元保持レジスタ104の値以下であると判定したときは(ステップS19でNO)、書換え(ステップS21)を行なわずに、ステップS23に移行する。   If it is determined from the comparison result that the address value indicated by the branch source data 112 to be input is equal to or less than the value of the branch source holding register 104 (NO in step S19), rewriting (step S21) is not performed. Control goes to step S23.

MCU200は対象プログラム実行を終了したとき、実行終了通知をエミュレータ100に通知する。   When the MCU 200 finishes executing the target program, the MCU 200 notifies the emulator 100 of an execution end notification.

エミュレータ100の入力部107が、実行終了通知を入力すると、図5の処理を終了し(ステップS23でYES)、元の図4の処理に戻る。実行終了通知を入力しない間は(ステップS23でNO)、ステップS7に戻る。   When the input unit 107 of the emulator 100 inputs an execution end notification, the processing in FIG. 5 ends (YES in step S23), and the processing returns to the original processing in FIG. While the execution end notification is not input (NO in step S23), the process returns to step S7.

以降は、トレースデータであるパケットを入力する毎に、当該パケット中の分岐情報に基づきステップS7〜ステップS21を実行する。   Thereafter, each time a packet that is trace data is input, steps S7 to S21 are executed based on branch information in the packet.

以上の記録処理により、カバレッジ計測用メモリ101のアドレス(分岐命令の分岐先アドレスに対応)には、次位の分岐命令の分岐元アドレスの値が格納される形式でトレースデータが記録される。   By the above recording process, the trace data is recorded in the address of the coverage measurement memory 101 (corresponding to the branch destination address of the branch instruction) in a format in which the value of the branch source address of the next branch instruction is stored.

また、大小比較器105およびメモリ制御回路102によるアドレス値の比較処理および、比較結果に基づく、カバレッジ計測用メモリ101の分岐先アドレス値の書換え処理(ステップS21)により、カバレッジ計測用メモリ101の格納される分岐元アドレス値は、先行する分岐先アドレスから連続して実行されたプログラムコードが格納されたアドレス領域のサイズを示す。   Further, the address measurement memory 101 stores the address value comparison process by the magnitude comparator 105 and the memory control circuit 102 and the branch destination address value rewrite process (step S21) of the coverage measurement memory 101 based on the comparison result. The branch source address value indicates the size of the address area in which the program code continuously executed from the preceding branch destination address is stored.

<トレースデータの解析>
図6は、本発明の実施の形態1に係るカバレッジ計測に係る解析処理のフローチャートである。図6を参照して解析処理(図4のステップT2)を説明する。なお、予めホストコンピュータ300の記憶部302には、MCU200における対象プログラムのプログラムコード格納領域と同じサイズの解析用メモリ312が確保されて、ゼロクリアされていると想定する。
<Analysis of trace data>
FIG. 6 is a flowchart of analysis processing related to coverage measurement according to Embodiment 1 of the present invention. The analysis process (step T2 in FIG. 4) will be described with reference to FIG. It is assumed that an analysis memory 312 having the same size as the program code storage area of the target program in the MCU 200 is secured in advance in the storage unit 302 of the host computer 300 and is cleared to zero.

CPU301は、エミュレータ100と通信することにより、カバレッジ計測用メモリ101の先頭アドレスからデータを順番に読出す(ステップS23)。読出したデータが“ゼロ”であるか否かを判定する(ステップS25)。“ゼロ”であると判定すると(ステップS25でNO)、ステップS23に戻り、カバレッジ計測用メモリ101の次位のアドレスからデータを読出し、以降の処理を繰返す。   The CPU 301 communicates with the emulator 100 to sequentially read data from the head address of the coverage measurement memory 101 (step S23). It is determined whether or not the read data is “zero” (step S25). If it is determined to be “zero” (NO in step S25), the process returns to step S23, data is read from the next address in the coverage measurement memory 101, and the subsequent processing is repeated.

一方、“ゼロ”でないと判定すると(ステップS25でYES)、解析用メモリ312に対しマーキングする(ステップS27)。マーキングは、対象プログラム中の実行済みのプログラムコードを示すための処理を示す。具体的には、解析用メモリ312の分岐先アドレス(カバレッジ計測用メモリ101の直前のステップS23でデータ読出がされたアドレス)から次の分岐元アドレス(カバレッジ計測用メモリ101の直前のステップS23で読出されたアドレス値)までの各アドレス領域に、マークデータを格納する。マークデータは、実行されなかったプログラムコードから区別できるものであればよく、たとえば値“1”、フラグなどである。本実施の形態では、値“1”を格納する。   On the other hand, if it is determined that it is not “zero” (YES in step S25), the analysis memory 312 is marked (step S27). The marking indicates a process for indicating the executed program code in the target program. Specifically, from the branch destination address of the analysis memory 312 (the address read in step S23 immediately before the coverage measurement memory 101) to the next branch source address (in step S23 immediately before the coverage measurement memory 101). Mark data is stored in each address area up to (read address value). The mark data may be any data that can be distinguished from the program code that has not been executed. In the present embodiment, the value “1” is stored.

その後、CPU301は、カバレッジ計測用メモリ101のトレースデータが格納されている最終アドレス領域のデータを読出したか否かを判定し(ステップS29)、未だ最終アドレス領域のデータを読出していないと判定すると(ステップS29でNO)、ステップS23に戻るが、読出したと判定すると(ステップS29でYES)、図6の処理は終了し、図4の元の処理に戻る。   Thereafter, the CPU 301 determines whether or not the data in the final address area in which the trace data of the coverage measurement memory 101 is stored has been read (step S29), and determines that the data in the final address area has not been read yet (step S29). If NO in step S29), the process returns to step S23, but if it is determined that the data has been read (YES in step S29), the process in FIG. 6 ends and the process returns to the original process in FIG.

以上の解析処理により、最終的に解析用メモリ312にはMCU200で実行されたプログラムコードが格納されたアドレス領域のみに実行済みマークが格納されたカバレッジ計測の結果が生成される。生成されたカバレッジ計測結果は、表示部304などの出力デバイスを介して出力される。   As a result of the above analysis processing, the result of coverage measurement in which the executed mark is stored only in the address area in which the program code executed by the MCU 200 is finally stored in the analysis memory 312 is generated. The generated coverage measurement result is output via an output device such as the display unit 304.

ここで、対象プログラム中の各分岐命令の分岐先データが、異なる分岐先アドレスを示す場合のカバレッジ計測について、以下に具体的に説明する。   Here, the coverage measurement in the case where the branch destination data of each branch instruction in the target program indicates a different branch destination address will be specifically described below.

<トレースデータの具体例>
図7は、本発明の実施の形態1に係るカバレッジ計測用メモリ101に記憶されるデータ例を説明する図である。図7(A)を参照して、MCU200でプログラム実行が開始されるとトレースが開始される。トレース開始されると実行される分岐命令毎に、パケットが出力される。ここでは、出力されるパケットを示すトレース(1)〜(4)それぞれは、分岐先データ111および分岐元データ112のセットを含む。なお、図中では(1)〜(4)は、括弧に代替して丸を用いている。
<Specific examples of trace data>
FIG. 7 is a diagram for explaining an example of data stored in the coverage measurement memory 101 according to the first embodiment of the present invention. Referring to FIG. 7A, tracing is started when program execution is started in MCU 200. A packet is output for each branch instruction executed when the trace is started. Here, each of the traces (1) to (4) indicating packets to be output includes a set of branch destination data 111 and branch source data 112. In the figure, (1) to (4) use circles instead of parentheses.

MCU200から各分岐命令に対応する図7(A)の分岐情報が出力される場合に、カバレッジ計測用メモリ101には図5のフローチャートに従って、図7(B)に示すようデータが格納される。つまりに、図7(B)の制御部110は、各分岐命令について、対応の分岐先データ111が示す分岐先アドレスに対応するカバレッジ計測用メモリ101のアドレス領域に、次位に実行される分岐命令の分岐元データ112が示す分岐元アドレスを格納する。カバレッジ計測用メモリ101は、計測対象のプログラムコードサイズ分のメモリ領域101Eを有する。   When the branch information of FIG. 7A corresponding to each branch instruction is output from the MCU 200, data as shown in FIG. 7B is stored in the coverage measurement memory 101 according to the flowchart of FIG. That is, for each branch instruction, the control unit 110 in FIG. 7B executes the branch executed next to the address area of the coverage measurement memory 101 corresponding to the branch destination address indicated by the corresponding branch destination data 111. Stores the branch source address indicated by the branch source data 112 of the instruction. The coverage measurement memory 101 has a memory area 101E corresponding to the program code size to be measured.

なお、制御部110は、図3(A)のエミュレータ100の入力部107を除く部分を示す。   Note that the control unit 110 indicates a portion excluding the input unit 107 of the emulator 100 in FIG.

この構成によると、分岐先データ111(すなわち、分岐先アドレス)をカバレッジ計測用メモリ101のアドレスで置き換えることができる。その結果、カバレッジ計測用メモリ101に格納するべきデータは、分岐先データ111(すなわち、分岐先アドレス)のみで済ませることができ、従来方式(分岐先データ111と分岐元データ112のセットを格納する方式)に比較し、カバレッジ計測用メモリ101に必要なメモリ容量を少なくすることができる。   According to this configuration, the branch destination data 111 (that is, the branch destination address) can be replaced with the address of the coverage measurement memory 101. As a result, the data to be stored in the coverage measurement memory 101 can be only the branch destination data 111 (that is, the branch destination address), and the conventional method (a set of the branch destination data 111 and the branch source data 112 is stored). The memory capacity required for the coverage measurement memory 101 can be reduced as compared with the (method).

図8は、本発明の実施の形態1に係る対象プログラムと、カバレッジ計測用メモリ101の格納データとを模式的に示す図である。図8(A)は、カバレッジ計測用メモリ101に格納されるデータの一例を示し、図8(B)はMCU200の記憶部203の予め定められた領域に格納された対象プログラムを模式的に示す。   FIG. 8 is a diagram schematically showing a target program according to Embodiment 1 of the present invention and data stored in the coverage measurement memory 101. 8A shows an example of data stored in the coverage measurement memory 101, and FIG. 8B schematically shows a target program stored in a predetermined area of the storage unit 203 of the MCU 200. .

図8(B)を参照して、記憶部203の予め定められた領域はアドレスH´0100〜H´0500で指定されるアドレス領域を含む。当該予め定められた領域に格納された対象プログラムはたとえば3個の分岐命令を含む。対象プログラムが実行開始されると、まず1番目の分岐命令が実行される。   Referring to FIG. 8B, the predetermined area of storage unit 203 includes an address area designated by addresses H′0100 to H′0500. The target program stored in the predetermined area includes, for example, three branch instructions. When the execution of the target program is started, the first branch instruction is first executed.

1番目の分岐命令が実行されるときに出力されるパケットには、分岐元アドレス、すなわち1番目の分岐命令が格納されているアドレスH´0000と分岐先アドレスH´0100とが格納される。2番目の分岐命令が実行されるときに出力されるパケットには分岐元アドレス、すなわち当該分岐命令が格納されているアドレスH´0200と分岐先アドレスH´0300が検出される。3番目の分岐命令が実行されるときに出力されるパケットには分岐元アドレス、すなわち当該分岐命令が格納されているアドレスH´0400と分岐先アドレスH´0000が検出される。なお、3番目の分岐命令が実行されるときにプログラム実行は終了する。プログラム実行終了を検出したOCD回路204は、分岐先アドレスとしてアドレスH´0000を生成する。   The packet that is output when the first branch instruction is executed stores the branch source address, that is, the address H′0000 where the first branch instruction is stored and the branch destination address H′0100. In the packet output when the second branch instruction is executed, a branch source address, that is, an address H′0200 and a branch destination address H′0300 in which the branch instruction is stored are detected. In the packet output when the third branch instruction is executed, a branch source address, that is, an address H′0400 and a branch destination address H′0000 in which the branch instruction is stored is detected. Note that program execution ends when the third branch instruction is executed. The OCD circuit 204 that detects the end of program execution generates an address H′0000 as a branch destination address.

図8(B)では、破線はCPU201が実行する命令の実行フローを模式的に示し、実線が示すアドレス領域は対象プログラムのプログラムコードが格納されたアドレス領域を含む。また、当該破線に関連付けてアドレス値(H´0100〜H´0500)が示される。実線に重畳して示される長方形はカバレッジ計測時に実行されたプログラムコードの格納領域を示す。具体的には、長方形の長手方向の長さは、実行されたプログラムコードが格納されたアドレス領域のサイズを示す。   In FIG. 8B, the broken line schematically shows the execution flow of instructions executed by the CPU 201, and the address area indicated by the solid line includes an address area in which the program code of the target program is stored. In addition, address values (H′0100 to H′0500) are shown in association with the broken line. A rectangle superimposed on the solid line indicates a storage area for program code executed at the time of coverage measurement. Specifically, the length of the rectangle in the longitudinal direction indicates the size of the address area in which the executed program code is stored.

図8のカバレッジ計測を、図5のフローチャートに従い説明する。なお、エミュレータ100では、あらかじめカバレッジ計測用メモリ101は初期化(ゼロクリア)されている。MCU200により、対象プログラムの実行が開始されると、カバレッジ計測が開始される。   The coverage measurement of FIG. 8 will be described according to the flowchart of FIG. In the emulator 100, the coverage measurement memory 101 is initialized (zero-cleared) in advance. When the execution of the target program is started by the MCU 200, coverage measurement is started.

まず、1番目の分岐命令が実行されると、エミュレータ100は、分岐先アドレスH´0100と分岐元アドレスH´0000を格納したパケットを入力し(ステップS3)、パケットの分岐先アドレスH´0100はメモリアドレスレジスタ103に格納される(ステップS7)。   First, when the first branch instruction is executed, the emulator 100 inputs a packet storing the branch destination address H′0100 and the branch source address H′0000 (step S3), and the branch destination address H′0100 of the packet. Is stored in the memory address register 103 (step S7).

メモリ制御回路102は、メモリアドレスレジスタ103に格納されたアドレスH´0100に基づくアドレス指定により、カバレッジ計測用メモリ101から分岐元アドレス値(このときは、ゼロ)を読出し、読出したデータを分岐元保持レジスタ104に格納する(ステップS9、S11)。これと同時に、メモリアドレスレジスタ103に格納されているアドレス値(H´0100)を分岐先保持レジスタ106へ転送する(ステップS13)。   The memory control circuit 102 reads the branch source address value (in this case, zero) from the coverage measurement memory 101 by address designation based on the address H′0100 stored in the memory address register 103, and reads the read data into the branch source Store in the holding register 104 (steps S9, S11). At the same time, the address value (H′0100) stored in the memory address register 103 is transferred to the branch destination holding register 106 (step S13).

その後、2番目の分岐命令のパケットを入力する(ステップS15)。大小比較器105は、当該パケットの分岐元アドレスH´0200と分岐元保持レジスタ104の値(このときは、ゼロ)とを比較する(ステップS16)。そして、比較結果に基づき、前者が後者より大きいと判定する(ステップS19でYES)。メモリ制御回路102は分岐先保持レジスタ106のアドレス値(1番目の分岐命令の分岐先アドレスH´0100)に基づきカバレッジ計測用メモリ101をアドレス指定する。そしてし、当該アドレス指定領域の値を、2番目の分岐命令のパケットの分岐元アドレスH´0200に書換える(ステップS21)。   Thereafter, the packet of the second branch instruction is input (step S15). The magnitude comparator 105 compares the branch source address H′0200 of the packet with the value (in this case, zero) of the branch source holding register 104 (step S16). And based on a comparison result, it determines with the former being larger than the latter (it is YES at step S19). The memory control circuit 102 addresses the coverage measurement memory 101 based on the address value of the branch destination holding register 106 (the branch destination address H′0100 of the first branch instruction). Then, the value of the address designation area is rewritten to the branch source address H′0200 of the packet of the second branch instruction (step S21).

これにより、カバレッジ計測用メモリ101では、1番目の分岐命令の分岐先アドレスH´0100が指定する領域に、次位(2番目)の分岐命令の分岐元アドレス値(H´0200)が格納される。   Thus, in the coverage measurement memory 101, the branch source address value (H'0200) of the next (second) branch instruction is stored in the area specified by the branch destination address H'0100 of the first branch instruction. The

まだ、プログラムの実行終了とは判定されないので(ステップS23でNO)、ステップS7に戻る。   Since it is not yet determined that the program has been executed (NO in step S23), the process returns to step S7.

2番目の分岐命令のパケットの分岐先アドレスH´0300はメモリアドレスレジスタ103に格納される(ステップS7)。メモリ制御回路102は、メモリアドレスレジスタ103に格納されたアドレスH´0300に基づくアドレス指定により、カバレッジ計測用メモリ101から分岐元アドレス値(このときは、ゼロ)を読出し、読出したデータを分岐元保持レジスタ104に格納する(ステップS9、S11)。これと同時に、メモリアドレスレジスタ103に格納されているアドレス値(H´0300)を分岐先保持レジスタ106へ転送する(ステップS13)。   The branch destination address H′0300 of the packet of the second branch instruction is stored in the memory address register 103 (step S7). The memory control circuit 102 reads the branch source address value (in this case, zero) from the coverage measurement memory 101 by address designation based on the address H′0300 stored in the memory address register 103, and reads the read data into the branch source The data is stored in the holding register 104 (steps S9 and S11). At the same time, the address value (H′0300) stored in the memory address register 103 is transferred to the branch destination holding register 106 (step S13).

その後、3番目の分岐命令のパケットを入力する(ステップS15)。大小比較器105は、当該パケットの分岐元アドレスH´0400と分岐元保持レジスタ104の値(このときは、ゼロ)とを比較する(ステップS16)。比較結果に基づき、前者が後者より大きいと判定する(ステップS19でYES)。メモリ制御回路102は分岐先保持レジスタ106のアドレス値(2番目の分岐命令の分岐先アドレスH´0300)に基づきカバレッジ計測用メモリ101をアドレス指定する。そして、当該アドレス指定領域の値を3番目の分岐命令のパケットの分岐元アドレスH´0400に書換える(ステップS21)。   Thereafter, the third branch instruction packet is input (step S15). The magnitude comparator 105 compares the branch source address H′0400 of the packet with the value of the branch source holding register 104 (in this case, zero) (step S16). Based on the comparison result, it is determined that the former is larger than the latter (YES in step S19). The memory control circuit 102 addresses the coverage measurement memory 101 based on the address value of the branch destination holding register 106 (the branch destination address H′0300 of the second branch instruction). Then, the value in the address designation area is rewritten to the branch source address H′0400 of the packet of the third branch instruction (step S21).

これにより、カバレッジ計測用メモリ101では、2番目の分岐命令の分岐先アドレスH´0300が指定する領域に、次位(3番目)の分岐命令の分岐元アドレス値(H´0400)が格納される。   Thus, in the coverage measurement memory 101, the branch source address value (H'0400) of the next (third) branch instruction is stored in the area specified by the branch destination address H'0300 of the second branch instruction. The

その後、プログラムの実行終了と判定されるので(ステップS23でYES)、処理は元の図4に戻る。これにより、カバレッジ計測用メモリ101へのトレースデータの格納は終了する。   Thereafter, since it is determined that the execution of the program has ended (YES in step S23), the processing returns to the original FIG. Thereby, the storage of the trace data in the coverage measurement memory 101 ends.

図8(B)の対象プログラムを実行すると、カバレッジ計測用メモリ101には、図8(A)に示すように、1番目の分岐命令の分岐先アドレスH´0100で指定されるアドレス領域には2番目の分岐命令の分岐元アドレスH´0200が格納される。そして、2番目の分岐命令の分岐先アドレスH´0300で指定されるアドレス領域には3番目の分岐命令の分岐元アドレスH´0400が格納される。このように、カバレッジ計測用メモリ101には、アドレス(分岐命令の分岐先アドレスに対応)領域に、次位に実行される分岐命令の分岐元アドレスの値が格納されるようにトレースデータが記録される。   When the target program shown in FIG. 8B is executed, the coverage measurement memory 101 has an address area designated by the branch destination address H′0100 of the first branch instruction, as shown in FIG. The branch source address H′0200 of the second branch instruction is stored. The branch source address H′0400 of the third branch instruction is stored in the address area specified by the branch destination address H′0300 of the second branch instruction. Thus, the trace data is recorded in the coverage measurement memory 101 so that the value of the branch source address of the branch instruction executed next is stored in the address (corresponding to the branch destination address of the branch instruction) area. Is done.

<解析処理の具体例>
図9は、本発明の実施の形態に係るカバレッジ計測用メモリ101の格納データに対する解析処理の具体例を示す図である。
<Specific examples of analysis processing>
FIG. 9 is a diagram showing a specific example of analysis processing for data stored in the coverage measurement memory 101 according to the embodiment of the present invention.

図9では、図8に従ってカバレッジ計測用メモリ101に格納されたデータを、図6の手順で解析した結果(1)〜(7)(図中では括弧は丸に代替されている)が示される。ここでは、解析用メモリ312は、記憶部203の対象プログラムのプログラムコード領域と同じサイズを有する。解析用メモリ312は、アドレスH´0000〜H´FFFFで指定されるアドレス領域を有する。CPU301は、記憶部203のプログラムコード記憶領域のアドレスに1対1に割付けられたカバレッジ計測用メモリ101の全アドレス領域のうち、分岐元アドレス値が格納されているアドレス領域が占める大きさを検出する。   FIG. 9 shows the results (1) to (7) obtained by analyzing the data stored in the coverage measurement memory 101 according to FIG. 8 according to the procedure of FIG. 6 (the parentheses are replaced with circles in the figure). . Here, the analysis memory 312 has the same size as the program code area of the target program in the storage unit 203. The analysis memory 312 has an address area specified by addresses H′0000 to H′FFFF. The CPU 301 detects the size occupied by the address area in which the branch source address value is stored among all the address areas of the coverage measurement memory 101 assigned one-to-one to the address of the program code storage area in the storage unit 203. To do.

まず、ホストコンピュータ300のCPU301は、解析用メモリ312を初期化(ゼロクリア)する(結果(1)を参照)。   First, the CPU 301 of the host computer 300 initializes (clears to zero) the analysis memory 312 (see result (1)).

その後、CPU301は、カバレッジ計測用メモリ101の先頭アドレスH´0000の領域から読出処理を開始する。読出された値が初期値(ゼロ)と判定すると、すなわち当該アドレス領域には分岐元アドレス値は格納されていないと判定すると、次位のアドレス領域を読出処理する。このようにして、先頭アドレスH´0000〜アドレスH´00FFまでの各アドレス領域の読出処理を繰返すと、各アドレス領域から読出された値はゼロと判定されるので、上述したマーキングは実行されない(結果(2)を参照)。   Thereafter, the CPU 301 starts the reading process from the area of the start address H′0000 of the coverage measurement memory 101. If it is determined that the read value is the initial value (zero), that is, if the branch source address value is not stored in the address area, the next address area is read. In this way, when the reading process of each address area from the start address H'0000 to the address H'00FF is repeated, the value read from each address area is determined to be zero, and thus the above-described marking is not executed ( (See result (2)).

その後、CPU301は、アドレスH´0100の領域から分岐元アドレス値(H´0200)を読出す。したがって、CPU301は、解析用メモリ312のアドレスH´0100〜H´0200の各アドレス領域をマーキングする。ここでは、各アドレス領域に“1”を格納する(結果(3)を参照)。   Thereafter, the CPU 301 reads the branch source address value (H′0200) from the area of the address H′0100. Therefore, the CPU 301 marks each address area of the addresses H′0100 to H′0200 in the analysis memory 312. Here, “1” is stored in each address area (see result (3)).

続くアドレスH´0101からH´02FFまでの各アドレス領域から読出される値はゼロであるから、上述したマーキングは実行されない(結果(4)を参照)。   Since the value read from each address area from the subsequent addresses H′0101 to H′02FF is zero, the above-described marking is not executed (see result (4)).

その後、CPU301は、アドレスH´0300のアドレス領域からアドレスH´0400を読出す。したがって、CPU301は、解析用メモリ312のアドレスH´0300〜H´0400の各アドレス領域に“1”を格納する(結果(5)を参照)。   Thereafter, the CPU 301 reads the address H′0400 from the address area of the address H′0300. Therefore, the CPU 301 stores “1” in each address area of the addresses H′0300 to H′0400 of the analysis memory 312 (see the result (5)).

続くアドレスH´0301からH´FFFFまでの各アドレス領域から読出される値はゼロであるから、上述したマーキングは実行されない(結果(6)を参照)。   Since the value read from each address area from the subsequent addresses H′0301 to H′FFFF is zero, the above-described marking is not executed (see result (6)).

最終的に、解析用メモリ312には、先頭アドレス(H´0000)〜最終アドレス(H´FFFF)までの各アドレス領域には上記の結果(1)〜(6)の値(1または0)が格納されたカバレッジ解析結果が格納される(結果(7)を参照)。   Finally, the analysis memory 312 stores the values (1 or 0) of the above results (1) to (6) in each address area from the head address (H′0000) to the last address (H′FFFF). Is stored (see result (7)).

これにより、カバレッジ計測用メモリ101の全アドレス領域のうち、分岐元アドレス値が格納されているアドレス領域が占める大きさが検出される。   As a result, the size occupied by the address area in which the branch source address value is stored in the entire address area of the coverage measurement memory 101 is detected.

CPU301は、表示部304に図9の結果(7)に基づく画像または情報を表示する。これにより、ユーザは、対象プログラムについてのカバレッジ計測結果を確認することができる。画像としては、たとえば、結果(7)の“1”の部分のみを色を反転して表示する。   The CPU 301 displays an image or information based on the result (7) in FIG. Thereby, the user can confirm the coverage measurement result about the target program. For example, only the “1” portion of the result (7) is displayed with the color reversed.

また、情報としては、結果(7)をもとに、対象プログラムの全プログラムコード数に対する実行されたコード数が占める割合を算出して表示してもよい。すなわち、記憶部203の対象プログラムコード記憶領域のアドレスに1対1に割付けられたカバレッジ計測用メモリ101の全アドレス領域のうち、分岐元アドレス値が格納されているアドレス領域の割合い、すなわちカバレッジ(網羅率)を算出して表示するとしてもよい。   As information, the ratio of the number of executed codes to the total number of program codes of the target program may be calculated and displayed based on the result (7). That is, the ratio of the address area in which the branch source address value is stored among all the address areas of the coverage measurement memory 101 assigned one-to-one to the addresses of the target program code storage area of the storage unit 203, that is, coverage. (Coverage rate) may be calculated and displayed.

なお、出力は表示に限定されず、印刷であってもよい。
<実施の形態1の効果>
本実施の形態1と対比した従来のトレースデータの記録方法によるカバレッジ計測では、以下の課題が残る。
Note that the output is not limited to display but may be printing.
<Effect of Embodiment 1>
In the coverage measurement by the conventional trace data recording method compared with the first embodiment, the following problems remain.

課題(1):対象プログラムを実行後のソフトウェアによるトレースデータの解析処理に要する時間が、記録されたトレースデータ量が増加するほど増加する。このため、エミュレータで大量のトレースデータを取得している場合、解析に長時間を要する。   Problem (1): The time required for the analysis process of the trace data by the software after executing the target program increases as the amount of recorded trace data increases. For this reason, when a large amount of trace data is acquired by an emulator, analysis takes a long time.

課題(2):トレースデータの記録に、エミュレータに搭載しているトレースメモリ(カバレッジ計測用メモリ101に相当)を使用するような場合、トレースメモリの容量を超えるトレースデータが出力されるケースでは、当該要領を超えたトレースデータはレースメモリに上書きにより格納される。上書きにより、トレースデータの一部が消失し、カバレッジ計測は失敗する。回避策として、トレースメモリの上書きを抑止する処理を追加する方法を適用できる。つまり、トレースデータが格納されてトレースメモリがフルになったときに、MCUによる対象プログラムの実行を停止し、その後、トレースメモリのトレースデータをホストコンピュータへ転送し、転送後に実行停止していた対象プログラムの実行を再開することで上書きを抑止する。しかしながら、処理の追加により、カバレッジ計測のリアルタイム性が損なわれる。   Problem (2): When using trace memory (corresponding to coverage measurement memory 101) installed in the emulator for recording trace data, in the case where trace data exceeding the capacity of the trace memory is output, Trace data exceeding this point is stored in the race memory by overwriting. Due to overwriting, part of the trace data is lost and coverage measurement fails. As a workaround, it is possible to apply a method of adding processing for suppressing overwriting of the trace memory. In other words, when the trace data is stored and the trace memory becomes full, the execution of the target program by the MCU is stopped, then the trace data in the trace memory is transferred to the host computer, and the execution that has been stopped after the transfer Overwriting is suppressed by resuming program execution. However, the real-time property of coverage measurement is impaired by the addition of processing.

本実施の形態1では、上記の課題を解消する効果を得ることができる。
効果(1):図7〜図9に示すカバレッジ計測用メモリ101の使用方法と分岐情報の記録アルゴリズムを用いた場合、カバレッジ計測用メモリ101に格納される分岐情報は、分岐元データ112が示す分岐アドレスのみで済む。また、対象プログラムを実行する時間の長さに関わらずカバレッジ計測用メモリ101に必要な容量をプログラムサイズに応じた固定サイズとすることができて、上記の課題(1)は解消される。
In the first embodiment, it is possible to obtain the effect of solving the above problem.
Effect (1): When the usage method of the coverage measurement memory 101 and the branch information recording algorithm shown in FIGS. 7 to 9 are used, the branch information stored in the coverage measurement memory 101 is indicated by the branch source data 112. Only a branch address is required. Further, the capacity required for the coverage measurement memory 101 can be set to a fixed size according to the program size regardless of the length of time for executing the target program, and the above problem (1) is solved.

効果(2):カバレッジ計測用メモリ101は、記憶部203の対象プログラムコードを格納した領域に相当サイズのアドレス領域を有すればよい。その場合であっても、対象プログラム中の分岐命令の数に関わらず、またカバレッジ計測用メモリ101の上書きが発生することはなく、上記の課題(2)は解消される。   Effect (2): The coverage measurement memory 101 only needs to have an address area of a corresponding size in the area storing the target program code in the storage unit 203. Even in this case, overwriting of the coverage measurement memory 101 does not occur regardless of the number of branch instructions in the target program, and the above problem (2) is solved.

効果(3):ホストコンピュータ300による解析対象は、MCU200からの分岐情報量(パケット数)に影響されずカバレッジ計測用メモリ101に割当てられたプログラムコード領域サイズ分の範囲に限定することができて、常に一定時間での解析が可能である。また、トレースメモリ上書きによる破綻も生じない。   Effect (3): The analysis target by the host computer 300 can be limited to the range corresponding to the program code area size allocated to the coverage measurement memory 101 without being affected by the amount of branch information (number of packets) from the MCU 200. Analysis at a constant time is always possible. In addition, there is no failure due to overwriting of the trace memory.

効果(4):上述の効果は、対象プログラムを特別な加工をしないで得ることができる。   Effect (4): The above-described effect can be obtained without special processing of the target program.

[実施の形態2]
本実施の形態2では、対象プログラムが、同一アドレスに分岐するような複数の分岐命令を含む場合を説明する。つまり、実施の形態1では、対象プログラム中の各分岐命令の分岐先データは、異なる分岐先アドレスを示す場合であったが、本実施の形態2では、対象プログラム中の複数の分岐命令の分岐先データ111が同じアドレスを示す場合のカバレッジ計測について説明する。
[Embodiment 2]
In the second embodiment, a case where the target program includes a plurality of branch instructions that branch to the same address will be described. That is, in the first embodiment, the branch destination data of each branch instruction in the target program indicates a different branch destination address. However, in the second embodiment, a plurality of branch instructions in the target program are branched. Coverage measurement when the destination data 111 indicates the same address will be described.

なお、本実施の形態2でも、図1〜図3の構成と、図4〜図6のフローチャートが適用されるので、これらの説明は繰り返さない。   In the second embodiment, the configuration shown in FIGS. 1 to 3 and the flowcharts shown in FIGS. 4 to 6 are applied, and the description thereof will not be repeated.

図10は、本発明の実施の形態2に係る対象プログラムと、カバレッジ計測用メモリ101の格納データとを模式的に示す図である。図10(A)は、カバレッジ計測用メモリ101に格納されるデータの一例を示し、図10(B)はMCU200の記憶部203の予め定められた領域に格納された対象プログラムを模式的に示す。   FIG. 10 is a diagram schematically showing the target program according to the second embodiment of the present invention and the data stored in the coverage measurement memory 101. 10A shows an example of data stored in the coverage measurement memory 101, and FIG. 10B schematically shows a target program stored in a predetermined area of the storage unit 203 of the MCU 200. .

図10(B)を参照して、記憶部203の予め定められた領域はアドレスH´0100〜H´0500で指定されるアドレス領域を含む。当該予め定められた領域に格納された対象プログラムはたとえば4個の分岐命令を含む。対象プログラムが実行開始されると、1番目の分岐命令が実行される。   Referring to FIG. 10B, the predetermined area of storage unit 203 includes an address area designated by addresses H′0100 to H′0500. The target program stored in the predetermined area includes, for example, four branch instructions. When the execution of the target program is started, the first branch instruction is executed.

1番目の分岐命令が実行されるときに出力されるパケットには、分岐元アドレスH´0000と分岐先アドレスH´0100とが格納される。2番目の分岐命令が実行されるときに出力されるパケットには分岐元アドレスH´0200と分岐先アドレスH´0300が格納される。3番目の分岐命令が実行されるときに出力されるパケットには分岐元アドレスH´0400と分岐先アドレスH´0300が格納される。4番目の分岐命令が実行されるときに出力されるパケットには分岐元アドレスH´0500と分岐先アドレスH´0000が格納される。なお、4番目の分岐命令が実行されるときにプログラム実行は終了する。プログラム実行終了を検出するとOCD回路204は、分岐先アドレスとしてアドレスH´0000を検出する。   The packet that is output when the first branch instruction is executed stores the branch source address H′0000 and the branch destination address H′0100. A packet that is output when the second branch instruction is executed stores a branch source address H′0200 and a branch destination address H′0300. The packet that is output when the third branch instruction is executed stores the branch source address H′0400 and the branch destination address H′0300. The packet that is output when the fourth branch instruction is executed stores the branch source address H′0500 and the branch destination address H′0000. Note that the program execution ends when the fourth branch instruction is executed. When detecting the end of program execution, the OCD circuit 204 detects an address H′0000 as a branch destination address.

上記の1番目、2番目および3番目の分岐命令が実行された場合には、図10(A)のカバレッジ計測用メモリ101では、実施の形態1と同様に、1番目の分岐命令の分岐先アドレスH´0100で指定されるアドレス領域には2番目の分岐命令の分岐元アドレス値(H´0200)が格納される。そして、2番目の分岐命令の分岐先アドレスH´0300で指定されるアドレス領域には3番目の分岐命令の分岐元アドレス値(H´0400)が格納される。   When the first, second, and third branch instructions are executed, in the coverage measurement memory 101 of FIG. 10A, the branch destination of the first branch instruction is the same as in the first embodiment. A branch source address value (H′0200) of the second branch instruction is stored in the address area specified by the address H′0100. Then, the branch source address value (H′0400) of the third branch instruction is stored in the address area specified by the branch destination address H′0300 of the second branch instruction.

まだ、プログラムの実行終了とは判定されないので(ステップS23でNO)、ステップS7に戻る。   Since it is not yet determined that the program has been executed (NO in step S23), the process returns to step S7.

3番目の分岐命令のパケットの分岐先アドレスH´0300はメモリアドレスレジスタ103に格納される(ステップS7)。メモリ制御回路102は、メモリアドレスレジスタ103に格納されたアドレスH´0300に基づくアドレス指定により、カバレッジ計測用メモリ101から分岐元アドレス値(このときは、H´0400)を読出し、読出したデータを分岐元保持レジスタ104に格納する(ステップS9、S11)。これと同時に、メモリアドレスレジスタ103に格納されているアドレス値(H´0300)を分岐先保持レジスタ106へ転送する(ステップS13)。   The branch destination address H′0300 of the packet of the third branch instruction is stored in the memory address register 103 (step S7). The memory control circuit 102 reads the branch source address value (in this case, H′0400) from the coverage measurement memory 101 by address designation based on the address H′0300 stored in the memory address register 103, and reads the read data. Store in the branch source holding register 104 (steps S9 and S11). At the same time, the address value (H′0300) stored in the memory address register 103 is transferred to the branch destination holding register 106 (step S13).

その後、4番目の分岐命令のパケットを入力する(ステップS15)。大小比較器105は、当該パケットの分岐元アドレスH´0500と分岐元保持レジスタ104の値(このときは、H´0400)とを比較し(ステップS16)、比較結果に基づき、前者が後者より大きいと判定する(ステップS19でYES)。メモリ制御回路102は分岐先保持レジスタ106のアドレス値(3番目の分岐命令の分岐先アドレスH´0300)に基づきカバレッジ計測用メモリ101をアドレス指定する。そして、当該アドレス指定領域の値を、4番目の分岐命令のパケットの分岐元アドレス値(H´0500)に書換える(ステップS21)。   Thereafter, the packet of the fourth branch instruction is input (step S15). The magnitude comparator 105 compares the branch source address H′0500 of the packet with the value of the branch source holding register 104 (in this case, H′0400) (step S16). Based on the comparison result, the former is greater than the latter. It determines with it being large (it is YES at step S19). The memory control circuit 102 addresses the coverage measurement memory 101 based on the address value of the branch destination holding register 106 (the branch destination address H′0300 of the third branch instruction). Then, the value of the address designation area is rewritten to the branch source address value (H′0500) of the packet of the fourth branch instruction (step S21).

これにより、カバレッジ計測用メモリ101では、2番目の分岐命令の分岐先アドレスH´0300が指定する領域には、4番目の分岐命令の分岐元アドレス値(H´0500)が格納される。   Thus, in the coverage measurement memory 101, the branch source address value (H'0500) of the fourth branch instruction is stored in the area specified by the branch destination address H'0300 of the second branch instruction.

その後、プログラムの実行終了と判定されるので(ステップS23でYES)、図4の元の処理に戻る。   Thereafter, since it is determined that the execution of the program has ended (YES in step S23), the processing returns to the original processing in FIG.

図10(B)では、図8(B)と同様に、破線はCPU201が実行する命令の実行フローを記憶部203を模式的に示し、実線が示すアドレス領域は対象プログラムのプログラムコードが格納されたアドレス領域を含む。また、実線に関連して示される長方形の長手方向の長さは、実行されたプログラムコードが格納されたアドレス領域のサイズを示す。   In FIG. 10B, as in FIG. 8B, the broken line schematically shows the execution flow of instructions executed by the CPU 201 in the storage unit 203, and the address area indicated by the solid line stores the program code of the target program. Address area. Further, the length in the longitudinal direction of the rectangle shown in relation to the solid line indicates the size of the address area in which the executed program code is stored.

上記のように4番目の分岐命令の実行により分岐元アドレスH´0500が検出されて、直前(3番目)の分岐命令の分岐元アドレス値(H´0400)と新たに検出した分岐元アドレス値(H´0500)を比較し、大きい方の値(H´0500)を、カバレッジ計測用メモリ101のアドレス(H´0300)領域に格納する。すなわち、アドレス(H´0300)領域に格納されていた元の値(H´0400)を新たな分岐元アドレス値(H´0500)に書換える。これにより、対象プログラムの実行終了時に、カバレッジ計測用メモリ101の記録内容から、対象プログラムのアドレスH´0300からH´0500までのプログラムコードが実行されたことを示すことができる。   As described above, the branch source address H′0500 is detected by the execution of the fourth branch instruction, and the branch source address value (H′0400) of the immediately preceding (third) branch instruction and the newly detected branch source address value. (H′0500) is compared, and the larger value (H′0500) is stored in the address (H′0300) area of the coverage measurement memory 101. That is, the original value (H′0400) stored in the address (H′0300) area is rewritten with a new branch source address value (H′0500). Thereby, at the end of execution of the target program, it can be shown from the recorded contents of the coverage measurement memory 101 that the program code from the address H′0300 to H′0500 of the target program has been executed.

<タイミングチャート>
図11は、本発明の実施の形態2に係るエミュレータ100の動作を示すタイミングチャートである。図10の同一分岐先アドレスを有する複数の分岐命令が実行される場合のエミュレータ100の動作を、図11を参照し説明する。
<Timing chart>
FIG. 11 is a timing chart showing the operation of the emulator 100 according to the second embodiment of the present invention. The operation of the emulator 100 when a plurality of branch instructions having the same branch destination address in FIG. 10 are executed will be described with reference to FIG.

図11(A)は、MCU200からのパケットの信号を示す。MCU200からの信号は、エミュレータ100に入力後、エミュレータ100の内部の制御クロック(図11(B)を参照)に同期したトレース情報単位(パケットに相当)である、たとえば図11(C)の“分岐1”〜“分岐4”に整形される。   FIG. 11A shows a packet signal from the MCU 200. A signal from the MCU 200 is a trace information unit (corresponding to a packet) synchronized with an internal control clock (see FIG. 11B) of the emulator 100 after being input to the emulator 100. For example, “ It is shaped into branch 1 "to" branch 4 ".

上記の1番目、2番目、3番目および4番目の分岐命令に相当する“分岐1”〜“分岐4”が入力されると(図11(C)と(D)を参照)、メモリアドレスレジスタ103のデータはアドレス値H´0100→H´0300→H´0300と変化する(図11(E)を参照)。当該アドレスはアドレス113に相当する。メモリ制御回路102により、アドレス113により指定されるカバレッジ計測用メモリ101のアドレス領域からデータ114が読出されて(図11(F)と(G)を参照)、読出しデータ114は分岐元保持レジスタ104に格納される(図11(H)参照)。   When “branch 1” to “branch 4” corresponding to the first, second, third and fourth branch instructions are input (see FIGS. 11C and 11D), the memory address register The data 103 changes from address values H′0100 → H′0300 → H′0300 (see FIG. 11E). The address corresponds to the address 113. The memory control circuit 102 reads the data 114 from the address area of the coverage measurement memory 101 specified by the address 113 (see FIGS. 11F and 11G), and the read data 114 is read from the branch source holding register 104. (See FIG. 11H).

比較器105は、入力する分岐元アドレス値(図11(C)参照)と分岐元保持レジスタ104のアドレス値とを比較し、比較結果から、前者が後者より大きいと判定する、メモリ制御回路102は分岐先保持レジスタ106のアドレス値(図11(D)、図11(K)参照)に基づきカバレッジ計測用メモリ101をアドレス指定し、当該アドレス指定領域にライトデータレジスタの値(図11(I)参照)を格納する(図11(J)参照)。なお、ライトデータレジスタは、メモリ制御回路102内のレジスタ(図示しない)であって、カバレッジ計測用メモリ101に書込むデータを一時的に格納するためのレジスタを示す。   The comparator 105 compares the input branch source address value (see FIG. 11C) with the address value of the branch source holding register 104, and determines from the comparison result that the former is larger than the latter. Addresses the coverage measurement memory 101 based on the address value of the branch destination holding register 106 (see FIG. 11D and FIG. 11K), and the write data register value (FIG. 11 (I )) Is stored (see FIG. 11J). The write data register is a register (not shown) in the memory control circuit 102 and temporarily stores data to be written to the coverage measurement memory 101.

<実施の形態2の効果>
エミュレータ100は、MCU200から同じ分岐先アドレスを示す分岐先データ111を有する複数のパケットを連続して入力した場合に、入力順番に、先に入力したパケットと次位に入力したパケット間の分岐元データ112が示す分岐元アドレスを比較し、比較結果に基づき、大きい方を、カバレッジ計測用メモリ101の当該分岐先アドレス領域に格納するアルゴリズムを採用している。
<Effect of Embodiment 2>
When the emulator 100 continuously inputs a plurality of packets having the branch destination data 111 indicating the same branch destination address from the MCU 200, the emulator 100 switches the branch source between the previously input packet and the next input packet in the input order. An algorithm is used in which the branch source addresses indicated by the data 112 are compared and the larger one is stored in the branch destination address area of the coverage measurement memory 101 based on the comparison result.

これにより、同一分岐先アドレスを示す複数の分岐命令が実行される場合には、分岐元アドレス値に関わらず(分岐パターンに関わらず)、カバレッジ計測用メモリ101の当該同一分岐先アドレスが示す領域には、複数分岐命令のうちの最大値を示す分岐元アドレスが格納される。したがって、当該同一分岐先アドレス値と最大の分岐元アドレス値とから、複数分岐命令が実行されたときに連続して実行されたプログラムコードの範囲を記録することができる。したがって、同一分岐先アドレスを示す分岐命令が実行されるようなプログラムを計測対象とする場合であっても、カバレッジ計測用メモリ101のトレースデータ量の増加およびホストコンピュータ300による解析時間の増加を防止できる。   Thus, when a plurality of branch instructions indicating the same branch destination address are executed, the area indicated by the same branch destination address of the coverage measurement memory 101 regardless of the branch source address value (regardless of the branch pattern) Stores a branch source address indicating the maximum value of the plurality of branch instructions. Therefore, it is possible to record a range of program codes that are continuously executed when a plurality of branch instructions are executed from the same branch destination address value and the maximum branch source address value. Therefore, even when a program in which a branch instruction indicating the same branch destination address is executed is measured, an increase in the amount of trace data in the coverage measurement memory 101 and an increase in analysis time by the host computer 300 are prevented. it can.

[実施の形態3]
本実施の形態3では、対象プログラムから他のプログラムに分岐する場合を説明する。上述した実施の形態1と2では、分岐先は対象プログラム内を示したが、本実施の形態3では、対象プログラムを実行中に、対象外プログラムに分岐する場合のカバレッジ計測を説明する。ここでは、対象プログラムを実行中に、タイマ割込みが発生し、対象プログラム外の割込プログラムに分岐する場合を想定する。
[Embodiment 3]
In the third embodiment, a case will be described in which the target program branches to another program. In Embodiments 1 and 2 described above, the branch destination is in the target program. In Embodiment 3, coverage measurement in the case of branching to a non-target program during execution of the target program will be described. Here, it is assumed that a timer interrupt occurs during execution of the target program and branches to an interrupt program outside the target program.

図12は、本発明の実施の形態3に係る対象プログラムと割込プログラムへの分岐とを説明する図である。図13は、本発明の実施の形態3に係るエミュレータ1000の概略構成図である。図13のエミュレータ1000と図3(A)のエミュレータ100の構成と比較し異なる点は、エミュレータ1000はメモリ制御回路102に代替しメモリ制御回路1020を備える点にある。他の部分は、図3(A)に示したものと同じであり説明は繰り返さない。   FIG. 12 is a diagram for explaining the target program and the branch to the interrupt program according to Embodiment 3 of the present invention. FIG. 13 is a schematic configuration diagram of an emulator 1000 according to the third embodiment of the present invention. A difference between the emulator 1000 in FIG. 13 and the emulator 100 in FIG. 3A is that the emulator 1000 includes a memory control circuit 1020 instead of the memory control circuit 102. Other portions are the same as those shown in FIG. 3A, and description thereof will not be repeated.

図12(A)には、記憶部203に格納されたプログラムが模式的に示される。図12(B)には、図12(A)のプログラム実行時に、実行されるプログラムコードの範囲が太矢印で模式的に示される。図12(C)には、対象プログラム実行時に出力される分岐情報が模式的に示される。   FIG. 12A schematically shows a program stored in the storage unit 203. In FIG. 12B, a range of program codes to be executed when the program of FIG. 12A is executed is schematically shown by a thick arrow. FIG. 12C schematically shows branch information output when the target program is executed.

図12(A)では、対象プログラムのプログラムコードは記憶部203のアドレスH´0100〜H´0280に格納され、割込プログラムは、カバレッジ対象外のアドレスH´10000〜H´10020に格納されている。なお、図12(A)では、対象プログラムの各continue文は、本来、アドレスH´0250に分岐するが、説明の便宜上アドレスH´0140に分岐するものとする。   In FIG. 12A, the program code of the target program is stored at addresses H′0100 to H′0280 of the storage unit 203, and the interrupt program is stored at addresses H′10000 to H′10020 that are not covered by the coverage. Yes. In FIG. 12A, each continue statement of the target program originally branches to address H′0250, but it is assumed that it branches to address H′0140 for convenience of explanation.

動作において、対象プログラムが先頭アドレスのプログラムコードから実行開始されると、図12(B)に示すように矢印(1)〜(8)の順番で各矢印の長さ分のプログラムコードが実行される。各矢印先端(終端)のプログラムコードは分岐命令に相当する。したがって、当該先端に対応するアドレスが分岐元アドレスに相当し、次位の矢印の開始端に対応するアドレスが分岐先アドレスに相当する。   In operation, when the execution of the target program is started from the program code at the head address, the program code for the length of each arrow is executed in the order of arrows (1) to (8) as shown in FIG. The The program code at the tip (end) of each arrow corresponds to a branch instruction. Therefore, the address corresponding to the tip corresponds to the branch source address, and the address corresponding to the start end of the next arrow corresponds to the branch destination address.

図12(A)のアドレス(H´0230)のプログラムコードを実行時にタイマ割込(timer_int)が発生したとする(図12(B)の矢印(5)の先端)。このとき、CPU201は、プログラムカウンタの現在値を図示しないレジスタ(退避レジスタという)に退避させる。これにより、退避レジスタに割込プログラムから対象プログラムに戻るためのアドレス値(H´0230)を格納しておくことができる。   Assume that a timer interrupt (timer_int) occurs when the program code at the address (H′0230) in FIG. 12A is executed (the tip of the arrow (5) in FIG. 12B). At this time, the CPU 201 saves the current value of the program counter in a register (not shown) (referred to as a save register). As a result, the address value (H′0230) for returning from the interrupt program to the target program can be stored in the save register.

その後、プログラムカウンタの値はH´10000に更新されて、アドレスH´10000以降の割込プログラム(図12(B)の斜線部)に分岐して、割込プログラムが実行開始される(図12(B)の矢印(6))。   Thereafter, the value of the program counter is updated to H′10000, and the program branches to the interrupt program after the address H′10000 (the shaded area in FIG. 12B), and the interrupt program starts to be executed (FIG. 12). (B) arrow (6)).

割込プログラムが実行終了すると、CPU201は、プログラムカウンタの値を、退避レジスタの値に基づき書き換える。たとえば、アドレスH´0240を示すように書き換える。これにより、対象プログラムの、タイマ割込(timer_int)発生時点のプログラムコードから(矢印(7)を参照)実行が再開される。   When the execution of the interrupt program ends, the CPU 201 rewrites the value of the program counter based on the value of the save register. For example, it is rewritten to indicate the address H′0240. As a result, execution of the target program is resumed from the program code at the time of occurrence of the timer interrupt (timer_int) (see arrow (7)).

その後、矢印(7)の先端アドレスで分岐命令が実行されて、矢印(8)で示すプログラムコードが実行される。その後、対象プログラムの実行は終了し、MCU200からエミュレータ1000にプログラム実行終了通知が伝送される。   Thereafter, a branch instruction is executed at the tip address of the arrow (7), and the program code indicated by the arrow (8) is executed. Thereafter, the execution of the target program ends, and a program execution end notification is transmitted from the MCU 200 to the emulator 1000.

図12(A)の対象プログラムを実行中は、実施の形態1および2と同様の処理によりカバレッジ計測用メモリ101に分岐情報が出力される。対象プログラム開始から終了までに出力された分岐先情報(分岐先アドレスと分岐元アドレスのセット)は、図12(C)に模式的に示される。   During execution of the target program in FIG. 12A, branch information is output to the coverage measurement memory 101 by the same processing as in the first and second embodiments. The branch destination information (set of branch destination address and branch source address) output from the start to the end of the target program is schematically shown in FIG.

図12(C)の分岐情報600と700それぞれは、矢印(5)の先端アドレス領域の分岐命令が実行されるときに出力される分岐先情報(分岐先アドレス(H´10000)と分岐元アドレス(H´0230)のセット)と、矢印(6)の先端アドレス領域の分岐命令が実行されるときに出力される分岐先情報(分岐先アドレス(H´0240)と分岐元アドレス(H´10020)のセット)それぞれを示す。   Each of the branch information 600 and 700 in FIG. 12C includes branch destination information (branch destination address (H'10000) and branch source address) output when the branch instruction in the tip address area indicated by the arrow (5) is executed. (H′0230)) and branch destination information (branch destination address (H′0240) and branch source address (H′10020) output when the branch instruction in the tip address area indicated by the arrow (6) is executed. ) Set) Indicates each.

分岐情報600の分岐先アドレス(H´10000)は、カバレッジ計測用メモリ101のアドレス指定可能な範囲を超える。分岐情報700の分岐元アドレス(H´10020)を、カバレッジ計測用メモリ101の矢印(5)の分岐先アドレス(H´0240)の領域に格納すれば、誤計測となる。つまり、その後のホストコンピュータ300による解析の結果は、アドレスH´0240〜H´10020までのプログラムコードが実行されたことを示すことになるからである。   The branch destination address (H′10000) of the branch information 600 exceeds the addressable range of the coverage measurement memory 101. If the branch source address (H′10020) of the branch information 700 is stored in the area of the branch destination address (H′0240) indicated by the arrow (5) in the coverage measurement memory 101, erroneous measurement occurs. That is, the subsequent analysis result by the host computer 300 indicates that the program code from the address H′0240 to H′10020 has been executed.

そこで、本実施の形態3に係るエミュレータ1000のメモリ制御回路1020は、対象プログラム実行中に、対象プログラムから対象外のプログラムに分岐する場合であっても上記の誤計測とならないように、カバレッジ計測用メモリ101に分岐情報を格納する。   Therefore, the memory control circuit 1020 of the emulator 1000 according to the third embodiment performs coverage measurement so that the above erroneous measurement does not occur even when the target program branches from the target program during execution of the target program. Branch information is stored in the memory 101.

具体的には、メモリ制御回路1020は、入力パケットについてデータ600の分岐情報を検出した場合には、すなわちデータ113が示す分岐先アドレス値と閾値とを比較し、比較結果から、当該分岐先アドレス値は閾値よりも大きいと判定したときは、当該データ113を破棄する。そして、次に入力するパケットの分岐情報(すなわちデータ700)の分岐先アドレス(H´02040)を示すデータ113に基づくカバレッジ計測用メモリ101のアドレス指定領域の値を、先に入力していたパケットの分岐情報(すなわち、データ600)の分岐元アドレス(H´0230)値で書換える。なお、上記の閾値は、記憶部203の対象プログラムの記憶領域の最終アドレス値を示し、メモリ制御回路1020内の図示しないレジスタに格納されていると想定する。   Specifically, when the memory control circuit 1020 detects branch information of the data 600 for the input packet, that is, compares the branch destination address value indicated by the data 113 with a threshold value, and determines the branch destination address from the comparison result. When it is determined that the value is larger than the threshold value, the data 113 is discarded. Then, the packet in which the value of the address designation area of the coverage measurement memory 101 based on the data 113 indicating the branch destination address (H′02040) of the branch information (that is, data 700) of the next input packet is input first. Is rewritten with the branch source address (H'0230) value of the branch information (ie, data 600). Note that the above threshold value indicates the final address value of the storage area of the target program in the storage unit 203 and is assumed to be stored in a register (not shown) in the memory control circuit 1020.

これにより、カバレッジ計測用メモリ101のアドレスH´0240の領域に分岐元アドレスH´0230を格納することができて、対象プログラム実行中に、対象プログラム内から対象外プログラムへ分岐する分岐命令が実行されたとしても、カバレッジ計測用メモリ101に、上記の誤計測のないカバレッジ計測を可能とするトレースデータを格納することができる。   As a result, the branch source address H′0230 can be stored in the area of the address H′0240 of the coverage measurement memory 101, and a branch instruction for branching from the target program to the non-target program is executed during execution of the target program. Even if it has been done, the trace data enabling coverage measurement without the above-mentioned erroneous measurement can be stored in the coverage measurement memory 101.

<変形例1>
上記の分岐先データ111および分岐元データ112は、分岐先アドレスおよび分岐元アドレスを示すとしたが、これらデータはアドレスに限定されない。たとえば、分岐先データ111および分岐元データ112は、記憶部203の対象プログラムが格納された領域の先頭アドレスを基準としたオフセット値を示すとしてもよい。その場合には、エミュレータ100の内部で、たとえば入力部107で、入力パケットのデータ部に格納されている当該基準とオフセット値とから、分岐先アドレスおよび分岐元アドレスを算出する。
<Modification 1>
Although the above branch destination data 111 and branch source data 112 indicate a branch destination address and a branch source address, these data are not limited to addresses. For example, the branch destination data 111 and the branch source data 112 may indicate offset values based on the start address of the area in the storage unit 203 in which the target program is stored. In that case, the branch destination address and the branch source address are calculated from the reference and the offset value stored in the data portion of the input packet, for example, by the input unit 107 inside the emulator 100.

<変形例2>
上記の実施の形態では、対象プログラムはMCU200で実行されるとしたが、ホストコンピュータ300により実行されるとしてもよい。その場合には、ホストコンピュータ300の記憶部302に対象プログラムを格納し、CPU301が当該対象プログラムを実行する。実行中に検出される分岐情報(分岐命令実行毎に検出される分岐情報)は、図5のフローチャートに従って記憶部302の予め定められたトレース領域(カバレッジ計測用メモリ101に相当)に格納する。そして、対象プログラム実行終了後には、図6のフローチャートに従うプログラムを実行することにより、記憶部302のトレース領域のトレースデータを解析し、たとえば図9に示す解析結果を出力する。
<Modification 2>
In the above embodiment, the target program is executed by the MCU 200, but may be executed by the host computer 300. In that case, the target program is stored in the storage unit 302 of the host computer 300, and the CPU 301 executes the target program. Branch information detected during execution (branch information detected each time a branch instruction is executed) is stored in a predetermined trace area (corresponding to the coverage measurement memory 101) of the storage unit 302 in accordance with the flowchart of FIG. Then, after the execution of the target program is completed, the program according to the flowchart of FIG. 6 is executed to analyze the trace data in the trace area of the storage unit 302, and for example, the analysis result shown in FIG. 9 is output.

[実施の形態4]
実施の形態1〜3では、エミュレータ100がトレースデータを記録し、ホストコンピュータ300がトレースデータを解析するとしたが、トレースデータ記録はエミュレータ100に代替してホストコンピュータ300で実行するとしてもよい。その場合に、実施の形態1〜3に示すカバレッジ計測用メモリ101へのデータ格納および解析の処理は、図4〜6のフローチャートに従うプログラムとして提供することができる。このようなプログラムは、コンピュータに付属するCD−ROM、ROM、RAMおよびメモリカードなどのコンピュータ読取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、コンピュータに内蔵するハードディスクなどの記録媒体にて非一時的に記録させて、プログラムを提供することもできる。また、ネットワークを介したダウンロードによって、プログラムを提供することもできる。
[Embodiment 4]
In the first to third embodiments, the emulator 100 records the trace data and the host computer 300 analyzes the trace data. However, the trace data recording may be executed by the host computer 300 instead of the emulator 100. In that case, the data storage and analysis processing in the coverage measurement memory 101 shown in the first to third embodiments can be provided as a program according to the flowcharts of FIGS. Such a program can be recorded on a computer-readable recording medium such as a CD-ROM, ROM, RAM, and memory card attached to the computer and provided as a program product. Alternatively, the program can be provided by non-temporarily recording on a recording medium such as a hard disk built in the computer. A program can also be provided by downloading via a network.

たとえば、図2の構成では、CPU301を備えるホストコンピュータ300には、CD−ROM308を用いて当該プログラムを供給することができる。CPU301は、I/F307を介してCD−ROM308に格納されたプログラムを読出し、実行する。   For example, in the configuration of FIG. 2, the program can be supplied to the host computer 300 including the CPU 301 using the CD-ROM 308. The CPU 301 reads and executes a program stored in the CD-ROM 308 via the I / F 307.

提供されるプログラム製品は、記憶部302のハードディスクなどのプログラム格納部にインストールされてCPU301により読出されて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記録された記録媒体とを含む。   The provided program product is installed in a program storage unit such as a hard disk in the storage unit 302, read by the CPU 301, and executed. The program product includes the program itself and a recording medium on which the program is recorded.

上述の実施の形態では、情報処理システムが示される。情報処理システムは、複数の分岐命令を含むプログラムを実行するためのプログラム実行ユニットと、当該プログラム実行ユニットに伝送路を介し接続される情報処理装置を備える。この情報処理装置は、プログラム実行ユニットから、実行される分岐命令の分岐元データと対応の分岐先データとを入力するための入力部と、複数の分岐命令に関するデータを格納するためのメモリと、メモリのアクセスを制御するための制御部と、を備える。   In the above-described embodiment, an information processing system is shown. The information processing system includes a program execution unit for executing a program including a plurality of branch instructions, and an information processing apparatus connected to the program execution unit via a transmission path. The information processing apparatus includes an input unit for inputting branch source data of a branch instruction to be executed and corresponding branch destination data from a program execution unit, a memory for storing data relating to a plurality of branch instructions, A control unit for controlling access to the memory.

上記の制御部は、入力部が入力する分岐命令の分岐先データに基づき指定されるメモリのアドレス領域に、当該分岐命令の次位に実行される分岐命令について入力部が入力する分岐元データを格納する。   The control unit described above stores the branch source data input by the input unit for the branch instruction executed next to the branch instruction in the address area of the memory specified based on the branch destination data of the branch instruction input by the input unit. Store.

また、上述の実施の形態では、プロセッサを備えるコンピュータに、情報処理方法を実行させるためのプログラムが示される。このプログラムは、プロセッサに、複数の分岐命令を含むプログラムを実行するための外部のプログラム実行ユニットから、実行される分岐命令の分岐元データと対応の分岐先データとを入力するステップと、複数の分岐命令に関するデータを格納するためのメモリのアクセスを制御するステップと、を実行させる。アクセスを制御するステップでは、入力するステップにより入力する分岐命令の分岐先データに基づき指定されるメモリのアドレス領域に、当該分岐命令の次位に実行される分岐命令について入力するステップにより入力する分岐元データを格納する。   In the above-described embodiment, a program for causing a computer including a processor to execute an information processing method is shown. The program includes inputting a branch source data of a branch instruction to be executed and corresponding branch destination data from an external program execution unit for executing a program including a plurality of branch instructions to the processor; Controlling access to a memory for storing data relating to the branch instruction. In the step of controlling access, the branch input by the step of inputting the branch instruction executed next to the branch instruction in the address area of the memory specified based on the branch destination data of the branch instruction input by the input step Store the original data.

また、上述の実施の形態では、上記のプログラムを非一時的に記録した機械読取可能な記録媒体が示される。   In the above-described embodiment, a machine-readable recording medium in which the above program is recorded non-temporarily is shown.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.

100 エミュレータ、101 カバレッジ計測用メモリ、102 メモリ制御回路、103 メモリアドレスレジスタ、104 分岐元保持レジスタ、105 大小比較器、106 分岐先保持レジスタ、111 分岐先データ、112 分岐元データ、200 MCU、300 ホストコンピュータ、312 解析用メモリ。   100 Emulator, 101 Coverage measurement memory, 102 Memory control circuit, 103 Memory address register, 104 Branch source holding register, 105 Size comparator, 106 Branch destination holding register, 111 Branch destination data, 112 Branch source data, 200 MCU, 300 Host computer, 312 Memory for analysis.

Claims (8)

複数の分岐命令を含むプログラムの実行時に、分岐命令が実行される毎に、当該分岐命令の分岐元データと対応の分岐先データとを入力する入力部と、
前記複数の分岐命令に関するデータを格納するためのメモリと、
前記メモリのアクセスを制御するための制御部と、を備え、
前記制御部は、
前記入力部が入力する分岐命令の前記分岐先データに基づき指定される前記メモリのアドレス領域に、当該分岐命令の次位に実行される分岐命令について前記入力部が入力する分岐元データを格納する、情報処理装置。
When executing a program including a plurality of branch instructions, each time a branch instruction is executed, an input unit for inputting branch source data of the branch instruction and corresponding branch destination data;
A memory for storing data relating to the plurality of branch instructions;
A control unit for controlling access to the memory,
The controller is
The branch source data input by the input unit for the branch instruction executed next to the branch instruction is stored in the address area of the memory specified based on the branch destination data of the branch instruction input by the input unit. Information processing device.
前記制御部は、
前記指定されるアドレス領域に格納されているデータが示す値と、前記次位に実行される分岐命令について前記入力部が入力する分岐元データが示す値とを比較するための比較部を含み、
前記比較の結果から、前記入力する分岐元データが示す値は前記指定されるアドレス領域のデータが示す値よりも大きいと判定したとき、当該アドレス領域のデータを、当該分岐元データに書換える、請求項1に記載の情報処理装置。
The controller is
A comparison unit for comparing the value indicated by the data stored in the designated address area with the value indicated by the branch source data input by the input unit for the branch instruction executed at the next level;
From the result of the comparison, when it is determined that the value indicated by the input branch source data is larger than the value indicated by the specified address area data, the address area data is rewritten to the branch source data. The information processing apparatus according to claim 1.
前記制御部は、
前記比較の結果から、前記入力する分岐元データが示す値は前記指定されるアドレス領域のデータが示す値以下であると判定したとき、前記書換えを行わない、請求項2に記載の情報処理装置。
The controller is
3. The information processing apparatus according to claim 2, wherein the rewriting is not performed when it is determined from the result of the comparison that a value indicated by the input branch source data is equal to or less than a value indicated by the data in the designated address area. .
前記プログラムを記憶するための記憶領域を、さらに備え、
前記メモリは、前記記憶領域のアドレスに1対1に割付けられた前記アドレス領域を含む、請求項1から3のいずれかに記載の情報処理装置。
A storage area for storing the program;
The information processing apparatus according to claim 1, wherein the memory includes the address area assigned one-to-one to the address of the storage area.
前記メモリの全アドレス領域のうちから、分岐元データが格納されているアドレス領域を検出するための解析部を、さらに備える、請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, further comprising an analysis unit configured to detect an address area in which branch source data is stored from all address areas of the memory. 前記解析部は、前記メモリの全アドレス領域のうちから、分岐元データが格納されているアドレス領域の割合いを検出する、請求項5に記載の情報処理装置。   The information processing apparatus according to claim 5, wherein the analysis unit detects a ratio of address areas in which branch source data is stored among all address areas of the memory. 前記制御部は、
前記入力部が入力する分岐命令の前記分岐先データが示す値が閾値よりも大きいときは、当該分岐先データに対応の分岐元データを、その後に前記入力部が入力する分岐命令の前記分岐先データに基づき指定される前記メモリのアドレス領域に格納する、請求項1に記載の情報処理装置。
The controller is
When the value indicated by the branch destination data of the branch instruction input by the input unit is greater than a threshold value, the branch source data corresponding to the branch destination data is set, and then the branch destination of the branch instruction input by the input unit The information processing apparatus according to claim 1, wherein the information processing apparatus is stored in an address area of the memory designated based on data.
複数の分岐命令を含むプログラムの実行時に、分岐命令が実行される毎に、当該分岐命令の分岐元データと対応の分岐先データとを入力するステップと、
前記複数の分岐命令に関するデータを格納するためのメモリのアクセスを制御するステップと、を備え、
前記アクセスを制御するステップでは、
前記入力するステップにより入力する分岐命令の前記分岐先データに基づき指定される前記メモリのアドレス領域に、当該分岐命令の次位に実行される分岐命令について前記入力するステップにより入力する分岐元データを格納する、情報処理方法。
A step of inputting branch source data of the branch instruction and corresponding branch destination data each time the branch instruction is executed when executing a program including a plurality of branch instructions;
Controlling access of a memory for storing data relating to the plurality of branch instructions,
In the step of controlling the access,
The branch source data input by the step of inputting the branch instruction executed next to the branch instruction in the address area of the memory specified based on the branch destination data of the branch instruction input by the input step An information processing method for storing.
JP2012207976A 2012-09-21 2012-09-21 Information processor Pending JP2014063346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012207976A JP2014063346A (en) 2012-09-21 2012-09-21 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012207976A JP2014063346A (en) 2012-09-21 2012-09-21 Information processor

Publications (1)

Publication Number Publication Date
JP2014063346A true JP2014063346A (en) 2014-04-10

Family

ID=50618522

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012207976A Pending JP2014063346A (en) 2012-09-21 2012-09-21 Information processor

Country Status (1)

Country Link
JP (1) JP2014063346A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020154796A (en) * 2019-03-20 2020-09-24 日本電気株式会社 Malware analysis apparatus, malware analysis method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020154796A (en) * 2019-03-20 2020-09-24 日本電気株式会社 Malware analysis apparatus, malware analysis method, and program

Similar Documents

Publication Publication Date Title
US7886198B2 (en) Method and system of identifying overlays used by a program
US20170024266A1 (en) Memory system, information processing system, and host device
US8001427B2 (en) Method and system of indexing into trace data based on entries in a log buffer
JP4846493B2 (en) Debug system and debug circuit
US20160292057A1 (en) Real time terminal for debugging embedded computing systems
US10452513B2 (en) Trace data capture device and method, system, diagnostic method and apparatus and computer program
JP2010157218A (en) Method and device to profile ram memory object for displacement with nonvolatile memory
JPWO2005022390A1 (en) Microcomputer and system program development method
US9286248B2 (en) Methods and systems for moving and resizing I/O activity logs
US20080016415A1 (en) Evaluation system and method
CN109582521B (en) Method, device, equipment and medium for testing read-write performance of storage system
US20120151267A1 (en) System for extending use of a data address break point register to implement multiple watch points
US20060075310A1 (en) Microcomputer and trace control method capable of tracing desired task
JP2014063346A (en) Information processor
KR20180110482A (en) System and method for testing memory
JPWO2010032330A1 (en) Information processing apparatus and memory protection method thereof
US9092486B2 (en) Extensible I/O activity logs
JP2003263339A (en) Debug function-incorporated microcomputer
JP2009043061A (en) Debugging device and debugging method
KR20180122409A (en) Tracking activity
JP3251266B2 (en) Emulation system, upload data acquisition method, and recording medium recording the method
JP5000689B2 (en) Temporal correlation of messages transmitted by microprocessor monitor circuits.
JP5762229B2 (en) How to measure program performance
JP2006504205A (en) Temporal correlation of messages transmitted by microprocessor monitor circuits.
JP2007156594A (en) Program trace unit and method