JP2000122898A - Method and device for simulation - Google Patents

Method and device for simulation

Info

Publication number
JP2000122898A
JP2000122898A JP10293351A JP29335198A JP2000122898A JP 2000122898 A JP2000122898 A JP 2000122898A JP 10293351 A JP10293351 A JP 10293351A JP 29335198 A JP29335198 A JP 29335198A JP 2000122898 A JP2000122898 A JP 2000122898A
Authority
JP
Japan
Prior art keywords
target
host
program
execution time
simulation
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.)
Granted
Application number
JP10293351A
Other languages
Japanese (ja)
Other versions
JP3214459B2 (en
Inventor
Kenichi Tokunaga
賢一 徳永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP29335198A priority Critical patent/JP3214459B2/en
Publication of JP2000122898A publication Critical patent/JP2000122898A/en
Application granted granted Critical
Publication of JP3214459B2 publication Critical patent/JP3214459B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To estimate a target execution time in cross environment wherein a target to be developed is absent by estimating the target execution time according to the time of the execution of a program to be measured by a host and a target/host performance ratio. SOLUTION: A program A for a target is read in target memory information 19 of a simulation device 10 and executed by a target execution route 14 to obtain a clock number, and an execution time is found from the clock number and the clock cycle determined by design. Then the performance ratio of the target and host is found from the target execution time and host execution time. A program for the host is generated through a target/host converting process from a program (measured program) A for simulation and executed by the host 11 to find the host execution time (measured program execution time) and the target execution time is estimated by referring to the target/host performance ratio.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、シミュレーション
方法及び装置に関し、特に、ターゲットシステム(以
後、ターゲットと略称する)とホストシステム(以後、
ホストと略称する)が異なった種類の中央処理装置(C
PU)からなるクロス開発環境におけるシミュレーショ
ン方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a simulation method and apparatus, and more particularly, to a target system (hereinafter abbreviated as a target) and a host system (hereinafter abbreviated as a target).
A central processing unit (C) of a different type
PU) in a cross development environment.

【0002】[0002]

【従来の技術】従来、開発対象であるターゲットとホス
トが異なった種類の中央処理装置(CPU)からなるク
ロス開発環境において、ターゲットの動作をシミュレー
ションするシミュレーション方法が知られている。
2. Description of the Related Art Conventionally, there has been known a simulation method for simulating the operation of a target in a cross development environment in which a target to be developed and a host are composed of different types of central processing units (CPUs).

【0003】このように、ターゲットとホストのCPU
が異なる場合、ホスト上でターゲット用のオブジェクト
プログラムを動かすには、2つの方法が用いられる。第
1の方法は、ターゲットを構成するCPU(以下、ター
ゲットCPUと略称する)と同等な処理を行うソフトウ
ェアに、オブジェクトプログラムを読み込ませて処理を
行うものであり、第2の方法は、ターゲット用オブジェ
クトプログラムをホスト用オブジェクトプログラムに変
換して、動作させるものである。
As described above, the target and the host CPU
Are different, two methods are used to run the target object program on the host. The first method is to read the object program into software that performs the same processing as a CPU (hereinafter, abbreviated as a target CPU) that configures the target, and to perform the processing. The object program is converted into a host object program and operated.

【0004】第1の方法においては、クロック単位でタ
ーゲットCPUの状態(レジスタ、パイプライン、キャ
ッシュメモリ等の状態)のシミュレーションを行うこと
により、プログラムの実行時間をクロック単位で求める
ことができる。ところが、クロック単位でのCPUの状
態をソフトウェアで管理しているため、その実行に必要
な時間は、実際にターゲットCPUで処理を行う場合の
100倍〜1000倍以上となってしまう。
In the first method, a program execution time can be obtained in clock units by simulating the state of the target CPU (states of registers, pipelines, cache memories, etc.) in clock units. However, since the state of the CPU in clock units is managed by software, the time required for the execution is 100 to 1000 times or more as long as the processing is actually performed by the target CPU.

【0005】このように、シミュレーションに大変な時
間がかかることは、プログラム開発者にとって大きな負
担となるばかりでなく、開発コストの増大化をもたら
す。
[0005] As described above, the fact that a long time is required for the simulation not only imposes a great burden on a program developer, but also increases the development cost.

【0006】これに対し、第2の方法においては、ホス
トCPUによって直接プログラムが実行されるため、基
本的には高速に処理を完了することができる。この第2
の方法による従来のシミュレーション方法を以下に説明
する。
On the other hand, in the second method, since the program is directly executed by the host CPU, the processing can be basically completed at a high speed. This second
A conventional simulation method according to the above method is described below.

【0007】図3は、従来のシミュレーション方法によ
るシミュレーションの流れを示す説明図である。図3に
示すように、先ず、ターゲット用プログラムAを、ター
ゲット/ホスト変換により、ホストコンピュータ用プロ
グラムBに変換する。つまり、プログラムAがターゲッ
ト用だとそのプログラムAをホストで実行することがで
きないので、ホストで実行することができるように、例
えば命令を変更してホスト用プログラムBとする。
FIG. 3 is an explanatory diagram showing a flow of a simulation by a conventional simulation method. As shown in FIG. 3, first, the target program A is converted into a host computer program B by target / host conversion. That is, if the program A is for the target, the program A cannot be executed on the host, so that the instruction is changed to the host program B so that the program A can be executed on the host.

【0008】次に、変換されたプログラムBをホストコ
ンピュータで実行し、ホスト実行時間bを求める。この
ホスト実行時間bに基づき、ターゲットコンピュータと
ホストコンピュータに関する一般的な性能比であるター
ゲット/ホスト性能比を参照してターゲット実行時間の
見積もりを行い、ターゲット実行時間見積もりaを得
る。
Next, the converted program B is executed by a host computer, and a host execution time b is obtained. Based on the host execution time b, a target execution time is estimated by referring to a target / host performance ratio which is a general performance ratio between the target computer and the host computer, and a target execution time estimate a is obtained.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、このシ
ミュレーション方法の場合、プログラム実行時間の正確
な見積もりを求めることができなかった。即ち、ターゲ
ットCPU上の各命令は、パイプラインやキャッシュメ
モリ等の状態によって実行時間が変化してしまうのに加
え、どの箇所をどの位の回数実行するかが分からないた
め、予め実行時間を求めることが困難である。また、タ
ーゲット用オブジェクトプログラムと変換されたホスト
用オブジェクトプログラムの各命令毎の性能比にはばら
つきがあるため、ターゲットCPUとホストCPUのス
ペック上の性能比から単純に実行時間を推測することが
できない。
However, in the case of this simulation method, it has not been possible to obtain an accurate estimate of the program execution time. That is, since the execution time of each instruction on the target CPU changes depending on the state of the pipeline, the cache memory, and the like, and it is not known which part is executed and how many times, the execution time is obtained in advance. It is difficult. In addition, since the performance ratio of each instruction of the target object program and the converted host object program varies, the execution time cannot be simply estimated from the specification performance ratio of the target CPU and the host CPU. .

【0010】この性能比のばらつきは、以下の理由によ
る。先ず、ホストに対する命令とターゲットに対する命
令が対応していたとしても、これらの命令の実行時間比
が全ての命令において同じとは限らない。次に、ホスト
上にターゲットに対する命令に相当する命令が無い場
合、ターゲットCPUの命令をシミュレートする複数の
ホストCPUの命令からなるルーチンを呼び出さなけれ
ばならないことから、命令が、単純に変換できるものの
場合とシミュレーションルーチンを呼び出す必要がある
ものの場合とで、性能比が大きく変わる。更に、メモリ
構成の違いからアドレスを変換する処理が挿入されるこ
とがあり、変換処理が入るか否かで性能比が大きく変わ
ってしまう。
This variation in the performance ratio is due to the following reasons. First, even if instructions for the host correspond to instructions for the target, the execution time ratio of these instructions is not necessarily the same for all instructions. Next, when there is no instruction equivalent to the instruction for the target on the host, a routine consisting of a plurality of instructions of the host CPU that simulates the instruction of the target CPU must be called. The performance ratio greatly changes between the case and the case where the simulation routine needs to be called. Further, a process for converting addresses may be inserted due to a difference in memory configuration, and the performance ratio greatly changes depending on whether or not the conversion process is performed.

【0011】つまり、ターゲットコンピュータとホスト
コンピュータでは、得意な処理と不得意な処理が一致せ
ず、この得意或いは不得意の割合は各プログラムによっ
ても異なるため、ターゲット/ホスト性能比を一定の値
として表すことができ難い。また、一般的な得意或いは
不得意の割合とプログラム毎の得意或いは不得意の割合
との差が、性能比の精度を下げてしまう。
That is, in the target computer and the host computer, the special processing and the poor processing do not match, and the ratio of the special or poor processing differs depending on each program. Therefore, the target / host performance ratio is set to a constant value. Difficult to represent. In addition, the difference between the ratio of general strength or weakness and the rate of strength or weakness for each program lowers the accuracy of the performance ratio.

【0012】従って、上述した従来のシミュレーション
方法により得られたターゲット実行時間見積もりaは、
ターゲット用プログラムAとは無関係な、コンピュータ
に関する一般的な性能比であるターゲット/ホスト性能
比を利用して得られたものであり、見積もり精度が悪く
なるのが避けられなかった。
Therefore, the target execution time estimate a obtained by the above-mentioned conventional simulation method is
This is obtained by using the target / host performance ratio, which is a general performance ratio of the computer, which is irrelevant to the target program A, and it is inevitable that the estimation accuracy deteriorates.

【0013】なお、このようなシミュレーション方法に
ついては、本出願人による特願平10−081010号
の出願明細書にも開示されている。
Such a simulation method is also disclosed in the specification of Japanese Patent Application No. 10-081010 filed by the present applicant.

【0014】本発明の目的は、開発対象であるターゲッ
トが存在しないクロス開発環境において、ターゲットプ
ログラムの特性を正確に捉えたターゲット実行時間の見
積もりを得ることができるシミュレーション方法及び装
置を提供することである。
An object of the present invention is to provide a simulation method and apparatus capable of obtaining a target execution time estimation that accurately captures the characteristics of a target program in a cross development environment in which there is no target to be developed. is there.

【0015】[0015]

【課題を解決するための手段】上記目的を達成するた
め、本発明に係るシミュレーション方法は、ターゲット
命令をホスト命令に変換してシミュレーションを行って
ホスト実行時間を求め、ターゲットのハードウェアで処
理するのと同等の処理を行うソフトウェアでターゲット
命令をシミュレーションしてターゲット実行時間を求
め、両実行時間からターゲット/ホスト性能比を求める
処理と、被測定プログラムをホストで実行したプログラ
ム実行時間と前記ターゲット/ホスト性能比に基づき、
前記被測定プログラムをターゲットで実行した場合のタ
ーゲット実行時間見積もりを求める処理とを有すること
を特徴としている。
In order to achieve the above object, a simulation method according to the present invention converts a target instruction into a host instruction, performs a simulation, obtains a host execution time, and processes the host execution time with target hardware. A target instruction execution time is obtained by simulating a target instruction with software that performs the same processing as that described above, and a target / host performance ratio is obtained from the two execution times. Based on the host performance ratio,
Calculating a target execution time estimate when the program to be measured is executed on the target.

【0016】上記構成を有することにより、ターゲット
命令をホスト命令に変換してシミュレーションを行って
ホスト実行時間を求め、ターゲットのハードウェアで処
理するのと同等の処理を行うソフトウェアでターゲット
命令をシミュレーションしてターゲット実行時間を求
め、両実行時間からターゲット/ホスト性能比を求め
て、このターゲット/ホスト性能比と、被測定プログラ
ムをホストで実行したプログラム実行時間とに基づき、
被測定プログラムをターゲットで実行した場合のターゲ
ット実行時間見積もりが求められる。これにより、開発
対象であるターゲットが存在しないクロス開発環境にお
いて、ターゲットプログラムの特性を正確に捉えた、タ
ーゲット実行時間の見積もりを短い時間で得ることがで
きる。
With the above configuration, the target instruction is converted into a host instruction, a simulation is performed to determine the host execution time, and the target instruction is simulated by software that performs processing equivalent to processing by the target hardware. The target / host performance ratio is calculated from the two execution times, and the target / host performance ratio is calculated based on the target / host performance ratio and the program execution time when the program to be measured is executed on the host.
A target execution time estimate when the program to be measured is executed on the target is required. As a result, in a cross-development environment where there is no target to be developed, an estimate of the target execution time that accurately captures the characteristics of the target program can be obtained in a short time.

【0017】また、本発明に係るシミュレーション装置
により、上記シミュレーション方法を実現することがで
きる。
Further, the above simulation method can be realized by the simulation device according to the present invention.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0019】図1は、本発明の実施の形態に係るシミュ
レーション装置を示すブロック図である。図1に示すよ
うに、シミュレーション装置10は、ホストを構成する
ホストCPU11と、ホストメモリ12とを有し、ホス
トメモリ12には、シミュレーションプログラム13が
格納される。
FIG. 1 is a block diagram showing a simulation apparatus according to an embodiment of the present invention. As shown in FIG. 1, the simulation apparatus 10 has a host CPU 11 constituting a host, and a host memory 12, and a simulation program 13 is stored in the host memory 12.

【0020】このシミュレーション装置10により、開
発対象であるターゲットとホストが異なった種類の中央
処理装置(CPU)からなるクロス開発環境において、
ターゲットが存在しない場合であっても、ターゲット用
のプログラムAに基づいてターゲットの動作をシミュレ
ーションすることができる。
With this simulation apparatus 10, in a cross development environment in which a target to be developed and a host are composed of different types of central processing units (CPUs),
Even when the target does not exist, the operation of the target can be simulated based on the program A for the target.

【0021】シミュレーションプログラム13の実行に
より、ホストメモリ12には、ターゲット実行ルーチン
14、状態変更(デバッガ)ルーチン15、レジスタ情
報16、パイプライン情報17、キャッシュメモリ情報
18、及びターゲットメモリ情報19の各領域が確保さ
れる。
By executing the simulation program 13, each of the target execution routine 14, the state change (debugger) routine 15, the register information 16, the pipeline information 17, the cache memory information 18, and the target memory information 19 is stored in the host memory 12. An area is reserved.

【0022】ターゲット実行ルーチン14は、現在のタ
ーゲットの状態から次のクロックでのターゲットの状態
(レジスタ情報、パイプライン情報、キャッシュメモリ
情報、ターゲットメモリ情報等の状態)を作り出すプロ
グラムからなり、ターゲット実行が何回行われたかで、
ターゲット実行に要するクロック数が分かる。即ち、ク
ロック単位でターゲットCPUの状態のシミュレーショ
ンを行うことにより、プログラムの実行時間をクロック
単位で求めることができる。
The target execution routine 14 is a program for creating a target state (register information, pipeline information, cache memory information, target memory information, etc.) at the next clock from the current target state. The number of times
The number of clocks required for target execution can be found. That is, by simulating the state of the target CPU in clock units, the execution time of the program can be obtained in clock units.

【0023】このターゲット実行により、パイプライン
上にある各命令に基づいてレジスタやターゲットメモリ
/キャッシュメモリが更新され、パイプラインが新しい
命令を実行することが可能ならターゲットメモリから新
しい命令が読み込まれる。読み込みの際は、キャッシュ
メモリが更新される。最後に、次のパイプラインの状態
を作り出す。
By this target execution, the register and the target memory / cache memory are updated based on each instruction on the pipeline, and a new instruction is read from the target memory if the pipeline can execute a new instruction. When reading, the cache memory is updated. Finally, create the next pipeline state.

【0024】状態変更(デバッガ)ルーチン15は、タ
ーゲット状態をユーザが操作するためのプログラムから
なり、これによってユーザは、デバッグ作業においてタ
ーゲットの状態を変更したり、ターゲット用のプログラ
ム実行のためにターゲット状態の各要素を初期化するこ
とができる。この初期化には、ターゲットメモリに実行
対象となるプログラムを置く作業も含まれる。
The state change (debugger) routine 15 is composed of a program for the user to manipulate the target state, so that the user can change the state of the target in a debugging operation or execute the target program for executing the target program. Each element of the state can be initialized. This initialization includes the operation of placing the program to be executed in the target memory.

【0025】レジスタ情報16は、シミュレートするタ
ーゲットCPUが持っているレジスタに収められる値を
保存する場所であり、パイプライン情報17は、シミュ
レートするターゲットCPUが処理を行っているパイプ
ラインの途中経過を保存する場所である。パイプライン
による並列処理をシミュレートするには、パイプライン
内にある処理が滞りなく行える状態か否かの状態把握が
必要となる。
The register information 16 is a place for storing a value stored in a register of the target CPU to be simulated, and the pipeline information 17 is a part of the pipeline in which the target CPU to be simulated is processing. This is where you save your progress. In order to simulate the parallel processing by the pipeline, it is necessary to know whether the processing in the pipeline can be performed without delay.

【0026】キャッシュメモリ情報18は、シミュレー
トするターゲットCPUに備えられ、若しくはこのター
ゲットCPUにつながれているキャッシュメモリが持っ
ている、どこの位置のメモリをキャッシュしているか等
の情報を、保存する場所である。
The cache memory information 18 is provided for the target CPU to be simulated, or stores information such as the location of the memory cached in the cache memory connected to the target CPU. Location.

【0027】キャッシュメモリには、CPUが新たに読
み込んだデータが同時に書き込まれ、CPUが次にデー
タを読み込むとき、キャッシュメモリに必要なデータが
あれば、キャッシュメモリから読み込む。これにより、
メインメモリにアクセスする回数が減る。つまり、キャ
ッシュメモリに、そのときに必要な情報が入っていれば
処理が速いが、入っていないと遅いメモリにアクセスし
て一旦待たなければならず処理が遅くなるので、実行時
間を見積もるときに必要なデータが何処に入っているの
かを記録する必要がある。
Data newly read by the CPU is simultaneously written into the cache memory, and when the CPU next reads data, if there is necessary data in the cache memory, the data is read from the cache memory. This allows
The number of accesses to the main memory is reduced. In other words, if the necessary information is stored in the cache memory at that time, the process is fast, but if it is not, the slow memory must be accessed and temporarily waited, so the process becomes slow, so when estimating the execution time It is necessary to record where necessary data is stored.

【0028】ターゲットメモリ情報19は、シミュレー
トするターゲットCPUに備えられ、若しくはこのター
ゲットCPUにつながれているメモリに保存される内容
を、保存する場所である。実行時間見積もりの対象とな
るプログラムは、ここに置かれる。
The target memory information 19 is a place where the contents stored in the target CPU to be simulated or stored in the memory connected to the target CPU are stored. The program whose execution time is to be estimated is placed here.

【0029】図2は、図1のシミュレーション装置を用
いたシミュレーションの流れを示す説明図である。図2
に示すように、先ず、ターゲット用のプログラムAか
ら、ホスト実行によるホスト実行時間b及びシミュレー
ションによるターゲット実行時間aを求めて、ターゲッ
ト/ホスト性能比を得る。次に、シミュレーション目的
のプログラムA´に基づき、ターゲット/ホスト性能比
を参照してターゲット実行時間を見積もり、ターゲット
実行時間見積もりa´を得る。
FIG. 2 is an explanatory diagram showing a flow of a simulation using the simulation apparatus of FIG. FIG.
As shown in (1), first, a host execution time b by host execution and a target execution time a by simulation are obtained from the target program A to obtain a target / host performance ratio. Next, based on the simulation purpose program A ', the target execution time is estimated with reference to the target / host performance ratio to obtain a target execution time estimate a'.

【0030】ホスト実行によるホスト実行時間bは、タ
ーゲット用のプログラムAから、ターゲット/ホスト変
換処理によりホスト用のプログラムBを求めた後、この
ホスト用のプログラムBをホストで実行することによ
り、即ち、ターゲット命令をホスト命令に変換してシミ
ュレーションを行うことにより得られる。
The host execution time b due to execution of the host is obtained by obtaining the host program B from the target program A by the target / host conversion process, and then executing the host program B on the host. , By converting a target instruction into a host instruction and performing a simulation.

【0031】このシミュレーションによるターゲット実
行時間の見積もりは、ターゲットレス環境で行われる
が、プログラムがターゲット用だとそのプログラムをホ
ストで実行することができないので、ホストで実行する
ことができるように、例えば命令を変更してホスト用の
プログラムBを作成する。
The estimation of the target execution time by this simulation is performed in a targetless environment. However, if the program is for a target, the program cannot be executed by the host. The host program B is created by changing the instruction.

【0032】シミュレーションによるターゲット実行時
間aは、ターゲット用のプログラムAから、ターゲット
動作のシミュレーションにより、即ち、ターゲットのハ
ードウェアで処理するのと同等の処理を行うソフトウェ
アでターゲット命令をシミュレーションして、得られ
る。シミュレーションに際し、ターゲット用のプログラ
ムAは、シミュレーション装置10のターゲットメモリ
情報19に読み込まれ、ターゲット実行ルーチン14に
より実行されてクロック数が得られ、このクロック数と
設計で決められるクロック周期により実行時間を求める
ことができる。
The target execution time a by the simulation is obtained from the target program A by simulating the target operation, that is, by simulating the target instruction with software that performs the same processing as that performed by the target hardware. Can be At the time of the simulation, the target program A is read into the target memory information 19 of the simulation apparatus 10 and executed by the target execution routine 14 to obtain the number of clocks. The execution time is determined by the number of clocks and the clock cycle determined by design. You can ask.

【0033】即ち、1回だけターゲットの動作状態を含
めたシミュレーションを行うことにより、プログラムA
に対する正確なターゲット実行時間aが求められる。
That is, by executing a simulation including the operation state of the target only once, the program A
, An accurate target execution time a is obtained.

【0034】このターゲット実行時間aとホスト実行時
間bの2つの実行時間から、ターゲットとホストの性能
比を求める。この性能比は、プログラムに組み込まれた
各種命令単体の比ではなくプログラム全体の比を求め、
このプログラムにおけるホストに対するターゲットの正
確な性能比を求めることができる。
From the two execution times, the target execution time a and the host execution time b, the performance ratio between the target and the host is determined. This performance ratio is not the ratio of various instructions alone incorporated in the program, but the ratio of the entire program.
The exact performance ratio of the target to the host in this program can be determined.

【0035】シミュレーション目的のプログラム(被測
定プログラム)A´は、ユーザ所望の仕様による未完成
のターゲットシステムに合わせ、プログラムA(作成元
プログラム)に改造・修正等を加えて作成される。この
シミュレーション目的のプログラムA´から、ターゲッ
ト/ホスト変換処理によりホスト用のプログラムB´を
作成した後、ホスト用のプログラムB´をホストで実行
し、ホスト実行時間(被測定プログラム実行時間)b´
を求める。
The program A 'for simulation (program to be measured) A' is created by modifying or modifying the program A (creation source program) in accordance with an unfinished target system according to the specifications desired by the user. After creating a host program B 'from the simulation purpose program A' by target / host conversion processing, the host program B 'is executed on the host, and the host execution time (measured program execution time) b'
Ask for.

【0036】このホスト実行時間b´に基づき、先に求
めたターゲット/ホスト性能比を参照してターゲット実
行時間の見積もりを行い、ターゲット実行時間見積もり
a´を得る。
Based on the host execution time b ', the target execution time is estimated by referring to the target / host performance ratio obtained previously, and the target execution time estimate a' is obtained.

【0037】従って、シミュレーションにより正確なク
ロック数が求まり、このクロック数によりプログラムA
の特性におけるターゲット/ホスト性能比が正確に分か
ることから、プログラムAを一部修正したプログラムA
´についてのプログラム実行時間を、より正確に見積も
ることができる。
Therefore, the exact number of clocks is obtained by simulation, and the program A
Program A partially modified from Program A because the target / host performance ratio in the characteristics of
'Can be more accurately estimated.

【0038】このように、本発明によれば、ターゲット
不在のクロス開発環境において、ターゲット/ホスト性
能比を1回測定しておきホストでプログラムAを実行し
ただけで、プログラムB´のホスト実行時間b´とター
ゲット/ホスト性能比から、プログラムAを改造・修正
したプログラムA´のターゲット実行時間a´を高速且
つ高精度で見積もることができる。
As described above, according to the present invention, in the cross development environment where no target is present, the target / host performance ratio is measured once and the host executes the program A only by executing the program A. From b 'and the target / host performance ratio, the target execution time a' of the program A 'obtained by remodeling or modifying the program A can be estimated at high speed and with high accuracy.

【0039】つまり、プログラムA´をターゲット/ホ
スト変換して求めたプログラムB´については、ホスト
コンピュータ上で直接実行し処理結果を得るので、実行
時間がごく短い。加えて、ターゲット/ホスト性能比
は、命令単体の比ではなくプログラム全体の比になって
いることから、従来のように命令単体で性能比を求めて
いた場合に比べ、プログラムの流れを把握したより正確
な性能比に基づいて、ターゲット実行時間a´を正確に
見積もることができる。
In other words, the execution time of the program B 'obtained by subjecting the program A' to target / host conversion is very short because it is directly executed on the host computer to obtain the processing result. In addition, since the target / host performance ratio is not the ratio of the instruction itself but the ratio of the entire program, the flow of the program was grasped compared to the conventional case where the performance ratio was determined by the instruction alone. Based on the more accurate performance ratio, the target execution time a 'can be accurately estimated.

【0040】この結果、実行時間短縮等のプログラム調
整を行う際に、必要な調整の程度及び調整後の効果が明
らかになって、工数の減縮が可能になる。
As a result, when performing program adjustment such as execution time reduction, the degree of necessary adjustment and the effect after adjustment become clear, and the man-hour can be reduced.

【0041】即ち、プログラム全体における実行時間が
正確に分からないままプログラムの実行時間を短くしよ
うとすれば、どれだけ調整すれば良いのか、その調整が
初期仕様に基づきどこまで可能か或いは不可能なのかの
見当が付かず、調整結果を個々に確かめながら行わなけ
ればならないので、調整工数がかかり非常に大変であ
る。しかしながら、実行時間を正確に見積もることによ
って必要な調整の程度及び調整後の効果を明らかにする
ことができる。
That is, if the execution time of the program is to be shortened without knowing the execution time of the entire program accurately, how much should be adjusted, and how much adjustment is possible or impossible based on the initial specification. Since it is necessary to check the adjustment results individually without performing any adjustments, the adjustment man-hours are very long. However, by accurately estimating the execution time, it is possible to clarify the degree of adjustment required and the effect after adjustment.

【0042】また、ターゲット時間をシミュレーション
するのは、例えば1千倍の時間がかかるというように大
変な労力を要し、開発者にとって大きな負担となると共
に開発コストの増大を招くが、上述したように、正確さ
を得るために1回だけは実際の測定を行い、その結果に
基づいて以後のプログラム修正に対する正確な実行時間
の見積もりを得ることで、開発者の負担を軽減すると共
に開発コストを削減することができる。
Also, simulating the target time requires a great deal of labor, for example, it takes 1000 times longer, and places a great burden on the developer and increases the development cost. In addition, in order to obtain accuracy, the actual measurement is performed only once, and based on the result, an accurate estimation of the execution time for the subsequent program correction is obtained, thereby reducing the burden on the developer and reducing the development cost. Can be reduced.

【0043】なお、図1のターゲット実行ルーチンと各
種情報を、ターゲットCPUの電子(論理)回路をシミ
ュレーションする電子(論理)回路シミュレータを用い
た電子回路シミュレーション/論理回路シミュレーショ
ン及びその組み合わせに、一部或いは全体を置き換える
ことができる。例えば、ターゲット実行ルーチンの次の
クロックのパイプライン情報を作る部分とパイプライン
情報を、パイプライン及びそれを構成する演算器等の回
路をシミュレーションする電子(論理)回路シミュレー
タで置き換えることができる。
The target execution routine and various information shown in FIG. 1 are partially used in an electronic circuit simulation / logic circuit simulation using an electronic (logical) circuit simulator for simulating an electronic (logical) circuit of the target CPU, and a combination thereof. Alternatively, the whole can be replaced. For example, the part of the target execution routine that creates pipeline information for the next clock and the pipeline information can be replaced with an electronic (logic) circuit simulator that simulates the pipeline and circuits such as arithmetic units that constitute the pipeline.

【0044】[0044]

【発明の効果】以上説明したように、本発明によれば、
ターゲットに対するシミュレーションによるターゲット
実行時間とホスト実行時間からターゲット/ホスト性能
比を求めて、このターゲット/ホスト性能比と、被測定
プログラムをホストで実行したプログラム実行時間とに
基づき、被測定プログラムをターゲットで実行した場合
のターゲット実行時間見積もりが求められるので、開発
対象であるターゲットが存在しないクロス開発環境にお
いて、ターゲットプログラムの特性を正確に捉えた、タ
ーゲット実行時間の見積もりを短い時間で得ることがで
きる。
As described above, according to the present invention,
A target / host performance ratio is obtained from a target execution time and a host execution time by a simulation for the target, and the target program is measured based on the target / host performance ratio and the program execution time when the target program is executed on the host. Since a target execution time estimate in the case of execution is required, in a cross development environment where there is no target to be developed, an estimate of the target execution time that accurately captures the characteristics of the target program can be obtained in a short time.

【0045】この結果、実行時間短縮等のプログラム調
整を行う際に、必要な調整の程度及び調整後の効果が明
らかになって、工数の減縮が可能になると共に、プログ
ラム修正に対する正確な実行時間の見積もりを得ること
で、開発者の負担を軽減すると共に開発コストを削減す
ることができる。
As a result, when performing program adjustment such as execution time reduction, the degree of necessary adjustment and the effect after adjustment become clear, the man-hour can be reduced, and the accurate execution time for program correction can be reduced. By obtaining the estimate, the burden on the developer can be reduced and the development cost can be reduced.

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

【図1】本発明の実施の形態に係るシミュレーション装
置を示すブロック図である。
FIG. 1 is a block diagram showing a simulation device according to an embodiment of the present invention.

【図2】図1のシミュレーション装置を用いたシミュレ
ーションの流れを示す説明図である。
FIG. 2 is an explanatory diagram showing a flow of a simulation using the simulation device of FIG. 1;

【図3】従来のシミュレーション方法によるシミュレー
ションの流れを示す説明図である。
FIG. 3 is an explanatory diagram showing a flow of a simulation according to a conventional simulation method.

【符号の説明】[Explanation of symbols]

10 シミュレーション装置 11 ホストCPU 12 ホストメモリ 13 シミュレーションプログラム 14 ターゲット実行ルーチン 15 状態変更(デバッガ)ルーチン 16 レジスタ情報 17 パイプライン情報 18 キャッシュメモリ情報 19 ターゲットメモリ情報 A ターゲット用のプログラム A´ シミュレーション目的のプログラム B ホスト用のプログラム B´ ホスト用のプログラム a ターゲット実行時間 a´ ターゲット実行時間見積もり b ホスト実行時間 b´ ホスト実行時間 Reference Signs List 10 simulation apparatus 11 host CPU 12 host memory 13 simulation program 14 target execution routine 15 state change (debugger) routine 16 register information 17 pipeline information 18 cache memory information 19 target memory information A target program A ′ simulation target program B Host program B 'Host program a Target execution time a' Target execution time estimation b Host execution time b 'Host execution time

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】ターゲット命令をホスト命令に変換してシ
ミュレーションを行ってホスト実行時間を求め、ターゲ
ットのハードウェアで処理するのと同等の処理を行うソ
フトウェアでターゲット命令をシミュレーションしてタ
ーゲット実行時間を求め、両実行時間からターゲット/
ホスト性能比を求める処理と、 被測定プログラムをホストで実行した被測定プログラム
実行時間と前記ターゲット/ホスト性能比に基づき、前
記被測定プログラムをターゲットで実行した場合のター
ゲット実行時間見積もりを求める処理とを有することを
特徴とするシミュレーション方法。
1. A target instruction is converted to a host instruction, a simulation is performed to determine a host execution time, and a target instruction is simulated by software that performs processing equivalent to processing by target hardware, and the target execution time is calculated. From the two execution times,
A process of obtaining a host performance ratio; and a process of obtaining a target execution time estimate when the measured program is executed on the target based on the measured program execution time of executing the measured program on the host and the target / host performance ratio. A simulation method comprising:
【請求項2】前記性能比は、改造・修正等を加えて作成
された前記被測定プログラムの作成元プログラムを用い
て求めることを特徴とする請求項1に記載のシミュレー
ション方法。
2. The simulation method according to claim 1, wherein the performance ratio is obtained by using a program from which the program to be measured is created by modifying or modifying the program.
【請求項3】開発対象であるターゲットとホストが異な
った種類の中央処理装置からなるクロス開発環境におい
てターゲットが存在しない場合に用いられることを特徴
とする請求項1または2に記載のシミュレーション方
法。
3. The simulation method according to claim 1, wherein the target to be developed and the host are used when there is no target in a cross development environment including different types of central processing units.
【請求項4】ターゲット命令をホスト命令に変換してシ
ミュレーションを行ってホスト実行時間を求め、ターゲ
ットのハードウェアで処理するのと同等の処理を行うソ
フトウェアでターゲット命令をシミュレーションしてタ
ーゲット実行時間を求め、両実行時間からターゲット/
ホスト性能比を求め、被測定プログラムをホストで実行
したプログラム実行時間と前記ターゲット/ホスト性能
比に基づき、前記被測定プログラムを前記ターゲットで
実行した場合のターゲット実行時間見積もりを求めるシ
ミュレーション機能を備えたことを特徴とするシミュレ
ーション装置。
4. A target instruction is converted into a host instruction, a simulation is performed to determine a host execution time, and the target instruction is simulated by software that performs processing equivalent to that performed by target hardware, and the target execution time is calculated. From the two execution times,
A simulation function is provided for obtaining a host performance ratio, and for estimating a target execution time when the measured program is executed on the target, based on a program execution time of executing the measured program on the host and the target / host performance ratio. A simulation device characterized by the above-mentioned.
【請求項5】前記シミュレーション機能を有するシミュ
レーションプログラムが格納された記憶手段を備えるこ
とを特徴とする請求項4に記載のシミュレーション装
置。
5. The simulation apparatus according to claim 4, further comprising storage means for storing a simulation program having the simulation function.
【請求項6】前記シミュレーションプログラムは、 クロック単位でターゲットCPUの状態のシミュレーシ
ョンを行うターゲット実行ルーチン部と、 ユーザ操作によりターゲット状態を変更する状態変更ル
ーチン部と、 シミュレートするターゲットCPUが持っているレジス
タに収められる値を保存するレジスタ情報部と、 シミュレートするターゲットCPUが処理を行っている
パイプラインの途中経過を保存するパイプライン情報部
と、 どこの位置のメモリをキャッシュしているか等の情報を
保存するキャッシュメモリ情報部と、 実行時間見積もりの対象となるプログラム等のメモリに
保存される内容を保存するターゲットメモリ情報部とを
有することを特徴とする請求項5に記載のシミュレーシ
ョン装置。
6. The simulation program includes a target execution routine unit for simulating the state of the target CPU in clock units, a state change routine unit for changing the target state by a user operation, and a target CPU for simulating. A register information section that stores the values stored in the registers, a pipeline information section that stores the progress of the pipeline being processed by the simulated target CPU, and a location where the memory is cached. The simulation apparatus according to claim 5, further comprising: a cache memory information section that stores information; and a target memory information section that stores contents stored in a memory of a program or the like whose execution time is to be estimated.
JP29335198A 1998-10-15 1998-10-15 Simulation method and apparatus Expired - Fee Related JP3214459B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29335198A JP3214459B2 (en) 1998-10-15 1998-10-15 Simulation method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29335198A JP3214459B2 (en) 1998-10-15 1998-10-15 Simulation method and apparatus

Publications (2)

Publication Number Publication Date
JP2000122898A true JP2000122898A (en) 2000-04-28
JP3214459B2 JP3214459B2 (en) 2001-10-02

Family

ID=17793679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29335198A Expired - Fee Related JP3214459B2 (en) 1998-10-15 1998-10-15 Simulation method and apparatus

Country Status (1)

Country Link
JP (1) JP3214459B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007299212A (en) * 2006-04-28 2007-11-15 Fujitsu Ten Ltd Apparatus and method for evaluating porting of software
US9880841B2 (en) 2014-01-07 2018-01-30 Fujitsu Limited Computation method for computing performance value when processor executes code, computation apparatus for computing performance value when processor executes code, and computer readable storage medium storing computation program for computing performance value when processor executes code
WO2023112386A1 (en) * 2021-12-13 2023-06-22 日立Astemo株式会社 Simulation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007299212A (en) * 2006-04-28 2007-11-15 Fujitsu Ten Ltd Apparatus and method for evaluating porting of software
US9880841B2 (en) 2014-01-07 2018-01-30 Fujitsu Limited Computation method for computing performance value when processor executes code, computation apparatus for computing performance value when processor executes code, and computer readable storage medium storing computation program for computing performance value when processor executes code
WO2023112386A1 (en) * 2021-12-13 2023-06-22 日立Astemo株式会社 Simulation method

Also Published As

Publication number Publication date
JP3214459B2 (en) 2001-10-02

Similar Documents

Publication Publication Date Title
US8725485B2 (en) Simulation method and simulation apparatus
JP6448195B2 (en) Method for randomly accessing signal values of FPGA at runtime, data processing apparatus, computer program, digital storage medium, and method of implementing FPGA build
US20060130029A1 (en) Programming language model generating apparatus for hardware verification, programming language model generating method for hardware verification, computer system, hardware simulation method, control program and computer-readable storage medium
JPH0458072B2 (en)
JP2009522652A (en) System and method for generating multiple models at different levels of abstraction from a single master model
US20120029900A1 (en) Simulation method and system for simulating a multi-core hardware platform
US6983234B1 (en) System and method for validating processor performance and functionality
US6212493B1 (en) Profile directed simulation used to target time-critical crossproducts during random vector testing
JP2013105492A (en) System and method for designing digital circuitry with activity sensor
US7266791B2 (en) High level synthesis device, method for generating a model for verifying hardware, method for verifying hardware, control program, and readable recording medium
JP5514211B2 (en) Simulating processor execution with branch override
JPH04233040A (en) Simulation system for executing computer program
JP5034916B2 (en) Performance evaluation model generation method, system performance evaluation method, and performance evaluation model generation apparatus
JP5040625B2 (en) LSI power estimation method and apparatus
JP3214459B2 (en) Simulation method and apparatus
US6813599B1 (en) Efficient memory structure simulation for sequential circuit design verification
US20230056423A1 (en) Processor core simulator including trace-based coherent cache driven memory traffic generator
US20040015792A1 (en) Method for creating standard VHDL test environments
JP2000293557A (en) Simulation method for power consumption
JP3147851B2 (en) Simulation method, simulation device, and storage medium storing simulation program
US20030070117A1 (en) Simulation apparatus and simulation method
JP2011238137A (en) Performance estimation device
JP2007052783A (en) Simulation of data processor
US10853546B1 (en) Method and system for sequential equivalence checking
JPH10187484A (en) Simulator

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees