JP2003256239A - Method and device for executing operation verification simulation, and its program - Google Patents

Method and device for executing operation verification simulation, and its program

Info

Publication number
JP2003256239A
JP2003256239A JP2002055108A JP2002055108A JP2003256239A JP 2003256239 A JP2003256239 A JP 2003256239A JP 2002055108 A JP2002055108 A JP 2002055108A JP 2002055108 A JP2002055108 A JP 2002055108A JP 2003256239 A JP2003256239 A JP 2003256239A
Authority
JP
Japan
Prior art keywords
model
function
cache memory
memory model
monitor
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
JP2002055108A
Other languages
Japanese (ja)
Inventor
Takeshi Ishigure
毅 石槫
Mikio Shiyou
幹夫 尚
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data 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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP2002055108A priority Critical patent/JP2003256239A/en
Publication of JP2003256239A publication Critical patent/JP2003256239A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To realize high speed and accurate overall and systematic operation verification simulation by preventing malfunction and quickly acquiring processing results. <P>SOLUTION: Object directional structured programming language 'Read() function, Write() function (first function)' is discriminated from 'Monitor<SB>-</SB>Read() function, Monitor<SB>-</SB>Write() function (second function)' to execute simulation. At the time of performing access from a CPU model 101 to a hardware model 107, the first function stored in the hardware model 107 is called. At the time of performing access from a monitor 102 to the hardware 107, the number of processing in the function is made smaller than the first function stored in the hardware model 107, and any processing including the start or end of the hardware model 107 is not executed, and the second function for executing only the reading processing is called. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、制御系がファーム
ウェアプログラムを実行してハードウェアを制御する電
子装置の動作をコンピュータや専用装置上で検証する、
動作検証シミュレーションの実行方法及びシミュレーシ
ョン実行装置並びにプログラムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention verifies the operation of an electronic device in which a control system executes a firmware program to control hardware on a computer or a dedicated device.
The present invention relates to an operation verification simulation execution method, a simulation execution device, and a program.

【0002】[0002]

【従来の技術】従来、電子装置(例えば、プリンタやフ
ァクシミリ装置)などでは、制御系(例えば、CPU,
マイクロコンピュータ、適宜、CPUのみで表記)によ
って、この電子装置の各種機能に対応した制御を実行し
ている。このCPUは、電子装置に格納しているファー
ムウェアプログラムを実行して、その制御を行ってい
る。この種のファームウェアプログラムの開発段階で
は、このファームウェアプログラムによる制御の正常性
を確認するために、シミュレーションを繰り返し行って
いる。このシミュレーションは、コンピュータや専用装
置(以下、コンピュータのみで記載)におけるシミュレ
ータで実施している。このシミュレータでは、電子装置
のCPUやハードウェアをモデル化し、このハードウェ
アモデルを組み合わせて実際の電子装置が動作した際の
複数の状態を作成し、それぞれのシミュレーション(適
宜、部分的シミュレーションと記載)を実行して、その
全体・総合的な動作検証シミュレーション(適宜、シミ
ュレータ動作と記載)を行っている。
2. Description of the Related Art Conventionally, in electronic devices (for example, printers and facsimiles), control systems (for example, CPU,
A microcomputer, if appropriate, is represented by only a CPU) executes control corresponding to various functions of this electronic device. The CPU executes a firmware program stored in the electronic device and controls it. At the development stage of this type of firmware program, simulation is repeatedly performed in order to confirm the normality of control by this firmware program. This simulation is carried out by a simulator in a computer or a dedicated device (hereinafter, described only as a computer). In this simulator, the CPU and hardware of the electronic device are modeled, the hardware models are combined to create a plurality of states when the actual electronic device operates, and each simulation (appropriately described as partial simulation) Is executed, and an overall and comprehensive operation verification simulation (appropriately described as simulator operation) is performed.

【0003】これらのシミュレーションを繰り返し行う
ことによって、電子装置の動作が最適化される。この種
のシミュレーションでは、実行内容を記録するトレース
型シミュレータが知られている。このトレース型シミュ
レータでは、システムクロック信号を一つずつカウント
し、モデル化した電子装置の各部の状態を変更しながら
シミュレーションを進行させ、動作時間又は動作中に使
用したデータを含めてログファイルに記録している。ま
た、このシミュレータでは、デバック機能を付加するこ
とによって、シミュレータ動作を任意のファームウェア
プログラム制御上で一時停止させるブレークポイントを
ファームウェアプログラム中に設定したり、ファームウ
ェアプログラムの最小単位ずつで実行するステップ実行
が可能である。
By repeating these simulations, the operation of the electronic device is optimized. In this type of simulation, a trace-type simulator that records execution contents is known. In this trace type simulator, the system clock signal is counted one by one, the simulation progresses while changing the state of each part of the modeled electronic device, and the operation time or the data used during the operation is recorded in a log file. is doing. In addition, by adding a debug function to this simulator, it is possible to set breakpoints in the firmware program that suspend simulator operation on arbitrary firmware program control, and to execute steps in units of the firmware program. It is possible.

【0004】また、動作が一時停止しているときに、シ
ミュレータの動作指示を行うモニタ上から、それぞれの
ハードウェアモデルのレジスタ情報(レジスタ値)、メ
モリモデル情報、キャッシュメモリ情報の読み込み、及
び書き込みを行うことができる。このようにして、各時
間でのハードウェアモデルのレジスタ状態、メモリモデ
ル内容、キャッシュメモリ状態の情報が逐一得られるよ
うになる。すなわち、これらの情報をユーザが知ること
ができるようになる。
Further, when the operation is temporarily stopped, the register information (register value) of each hardware model, the memory model information, and the cache memory information are read and written from the monitor for instructing the operation of the simulator. It can be performed. In this way, the information on the register status of the hardware model, the memory model contents, and the cache memory status at each time can be obtained point by point. That is, the user can know these pieces of information.

【0005】以下、従来のシミュレータ動作について説
明する。図9は、従来のトレース型シミュレータの構成
を示すブロック図である。図9において、このトレース
型シミュレータは、CPUをモデル化したCPUモデル
201と、シミュレータを制御するモニタ202と、ア
ドレスデコーダ203と、電子装置内部のキャッシュメ
モリをモデル化したキャッシュメモリモデル204と、
電子装置の各機能をモデル化したデバイスモデル部20
5とから構成されている。このデバイスモデル部205
には、CPUモデル201が実行するファームウェアプ
ログラムを格納している。デバイスモデル部205に
は、電子装置の記憶部であるメモリをモデル化したメモ
リモデル206と、電子装置の各種機能をモデル化した
複数のハードウェアモデル207,208を有してい
る。
The conventional simulator operation will be described below. FIG. 9 is a block diagram showing the configuration of a conventional trace type simulator. In FIG. 9, the trace type simulator includes a CPU model 201 that models a CPU, a monitor 202 that controls the simulator, an address decoder 203, and a cache memory model 204 that models a cache memory inside an electronic device.
A device model unit 20 that models each function of the electronic device
It is composed of 5 and. This device model unit 205
Stores a firmware program executed by the CPU model 201. The device model unit 205 has a memory model 206 that models a memory that is a storage unit of the electronic device, and a plurality of hardware models 207 and 208 that models various functions of the electronic device.

【0006】モニタ202は、ユーザとのマンマシンイ
ンタフェースであり、入力操作装置と出力装置及び表示
装置(キーボード、プリンタ、CRT/LCD装置)を
有してシミュレーション実行を制御する。このモニタ2
02は次のような処理を実行する。 (1)シミュレーション実行時におけるファームウェア
プログラム中のブレークポイントの設定及び解除 (2)シミュレーションの開始、中断、終了及びステッ
プ実行 (3)ハードウェアのレジスタの情報と、メモリモデル
206、キャッシュメモリモデル204及びCPUモデ
ル201のレジスタ情報(レジスタ値)の読み込み及び
書き込み (4)CPUモデル201が実行するファームウェアプ
ログラムのアッセンブラコードの表示
The monitor 202 is a man-machine interface with the user, and has an input operation device, an output device, and a display device (keyboard, printer, CRT / LCD device) to control the simulation execution. This monitor 2
02 executes the following processing. (1) Setting and cancellation of breakpoints in firmware program during simulation execution (2) Start, suspension, end and step execution of simulation (3) Hardware register information, memory model 206, cache memory model 204 and Reading and writing register information (register value) of CPU model 201 (4) Display of assembler code of firmware program executed by CPU model 201

【0007】また、図9中のトレース型シミュレータに
おけるCPUモデル201とキャッシュメモリモデル2
04からハードウェアモデル207,208までのそれ
ぞれのシミュレーションは、オブジェクト指向の構造化
プログラミング言語/「C++」言語によって記述され
る処理を実行し、それぞれ一つの「Class」となっ
ている。また、キャッシュメモリモデル204以外のモ
デルとモニタ202は、アドレスデコーダ203を介し
て接続されている。キャッシュメモリモデル204は、
モニタ202とCPUモデル201とキャッシュメモリ
モデル204とに直接接続されており、それぞれハード
ウェアモデル207,208、メモリモデル206、キ
ャッシュメモリモデル204には、これら内部のメモリ
情報やレジスタ情報を書き込むための「書き込み/Wr
ite()関数」、そのモデル中のメモリ情報やレジス
タ情報を読み込むための「読み出し/Read()関
数」格納されている。
Further, the CPU model 201 and the cache memory model 2 in the trace type simulator shown in FIG.
Each of the simulations from 04 to the hardware models 207 and 208 executes a process described by an object-oriented structured programming language / “C ++” language, and each becomes one “Class”. The models other than the cache memory model 204 and the monitor 202 are connected via the address decoder 203. The cache memory model 204 is
The monitor 202, the CPU model 201, and the cache memory model 204 are directly connected to each other. The hardware models 207 and 208, the memory model 206, and the cache memory model 204 are used for writing these internal memory information and register information, respectively. "Write / Wr
"ite () function" and "read / Read () function" for reading memory information and register information in the model are stored.

【0008】図10は図9における従来のシミュレータ
動作を説明するためのフローチャートである。図10に
おいて、シミュレーションが開始されると、ハードウェ
アモデル207,208,CPUモデル201などの初
期化を行う(ステップS301)。この後、シミュレー
タは、モニタ202でのユーザ指示の待機状態となる
(ステップS302)。次に、モニタ202上でユーザ
が「run(restart)」などの指示を行うと、
シミュレータは、図示しないシミュレーション実行部
(例えば、シミュレータとしてコンピュータを用いた場
合の処理モジュール)を呼び出してシミュレーションを
開始(再開)する(ステップS303)。
FIG. 10 is a flow chart for explaining the conventional simulator operation in FIG. In FIG. 10, when the simulation is started, the hardware models 207, 208, the CPU model 201, etc. are initialized (step S301). After that, the simulator enters a standby state for a user instruction on the monitor 202 (step S302). Next, when the user gives an instruction such as “run (restart)” on the monitor 202,
The simulator is a simulation execution unit (not shown).
(For example, a processing module when a computer is used as a simulator) is called to start (restart) the simulation (step S303).

【0009】このシミュレーション中において、ファー
ムウェアプログラムに前記したブレークポイントが設定
され、又はモニタ202からユーザによる中断の指示が
あると、シミュレーションを一時的に中断し、再度モニ
タ202からの指示待ち状態となる。モニタ202にお
いて、「Write()関数」又は「Read()関
数」を呼び出し、「Read」指示の場合は、その結果
をモニタ202に返送する。また、「end」の指示の
場合は、シミュレーション終了となる。
During the simulation, if the above-mentioned breakpoint is set in the firmware program or the monitor 202 gives an instruction to interrupt the user, the simulation is temporarily interrupted and the monitor 202 waits for an instruction again. . In the monitor 202, the “Write () function” or “Read () function” is called, and in the case of the “Read” instruction, the result is returned to the monitor 202. If the instruction is "end", the simulation ends.

【0010】図11は、図10中のシミュレータにおけ
るシミュレーション実行部の処理内容を説明するための
フローチャートである。図11において、モニタ202
からシミュレーション実行部が呼び出されると、まず、
シミュレータにおける一つのシステムクロック信号を進
め(ステップS401)、CPUモデル201がメモリ
モデル206からの命令の読み込みが可能な場合(ステ
ップS402)、CPUモデル201がメモリモデル2
06から、実行する命令を読み込む(ステップS40
3)。次に、この命令を解釈した後に、その命令を実行
する(ステップS404)。
FIG. 11 is a flow chart for explaining the processing contents of the simulation executing section in the simulator shown in FIG. In FIG. 11, the monitor 202
When the simulation execution part is called from, first,
When one system clock signal in the simulator is advanced (step S401), and the CPU model 201 can read an instruction from the memory model 206 (step S402), the CPU model 201 changes to the memory model 2
The instruction to be executed is read from 06 (step S40
3). Next, after interpreting this instruction, the instruction is executed (step S404).

【0011】この命令実行の後に、CPUモデル201
から外部アクセスがあるか、又はハードウェアモデル2
07,208の実行を処理するかを調べる(ステップS
405)。この調べで必要ならば、ハードウェアモデル
207又は208の実行を処理する(ステップS40
6)。そして、実行した命令位置にブレークポイントが
設定されているか、又はモニタ202から終了や中断の
命令が有るかを調べる(ステップS407)。条件によ
っては、シミュレーション実行部は、その実行を終了し
てモニタ202における実行に戻る。
After execution of this instruction, the CPU model 201
External access from hardware model 2
It is checked whether the execution of 07 and 208 is processed (step S
405). If necessary in this examination, the execution of the hardware model 207 or 208 is processed (step S40).
6). Then, it is checked whether a breakpoint is set at the executed instruction position or whether there is a termination or interruption instruction from the monitor 202 (step S407). Depending on the conditions, the simulation executing unit ends the execution and returns to the execution in the monitor 202.

【0012】このとき、CPUモデル201の図示しな
いレジスタ情報と、メモリモデル206の内容、ハード
ウェアモデル207,208のレジスタ情報が保持され
る。シミュレーション実行部が、その実行を終了しない
場合、再度システムクロック信号の進みとともに、命令
を読み込んでシミュレーションを順次実行する。
At this time, the register information (not shown) of the CPU model 201, the contents of the memory model 206, and the register information of the hardware models 207 and 208 are held. When the simulation execution unit does not finish its execution, the instructions are read and the simulations are sequentially executed as the system clock signal advances again.

【0013】図12は従来のシミュレータ動作における
他の例を説明するためのブロック図である。図12にお
いて、このシミュレータ動作は、CPUモデル201か
らハードウェアモデル207,208のレジスタ情報へ
のアクセス状態と、モニタ202からのハードウェアモ
デル207,208のレジスタ情報へのアクセス状態を
示している。この両方のアクセスでは、アドレスデコー
ダ203によってアクセスするデバイスモデル部205
のハードウェアモデル207,208を決定した後に、
「Read()関数」及び「Write()関数」を呼
び出している。
FIG. 12 is a block diagram for explaining another example of the conventional simulator operation. In FIG. 12, this simulator operation shows an access state from the CPU model 201 to the register information of the hardware models 207 and 208 and an access state from the monitor 202 to the register information of the hardware models 207 and 208. In both of these accesses, the device model unit 205 accessed by the address decoder 203
After determining the hardware models 207 and 208 of
The "Read () function" and "Write () function" are called.

【0014】図13は従来のシミュレータにおけるハー
ドウェアモデル207,208の「Write()関
数」を説明するための図である。図13において、ハー
ドウェアモデル207,208は、シミュレーションの
最適化のために、「Write()関数」によって、そ
のレジスタ情報が一定条件に達した際にのみ動作を開始
する構造のモデル例がある。ハードウェアモデル20
7,208の「Write()関数」が呼び出される
と、その関数中でアドレス情報(アドレス値)のデコー
ドを行い、期待されたレジスタ情報の算出後に、そのア
ドレス情報に該当する変数に引数(data)を代入す
る。この後で、一定の条件を満たしている際にハードウ
ェアモデル207,208を起動させ、また、終了させ
るなどの処理を行っている。なお、ハードウェアモデル
207,208を起動させるのは、CPUモデル201
に、そのハードウェアモデル207,208が起動して
いることを登録するためである。なお、一定の条件に当
てはまると、例えば、動作中、書き替えを阻止するレジ
スタも存在する。
FIG. 13 is a diagram for explaining the "Write () function" of the hardware models 207 and 208 in the conventional simulator. In FIG. 13, the hardware models 207 and 208 have a model example of a structure that starts operation only when the register information thereof reaches a certain condition by a “Write () function” for optimization of simulation. . Hardware model 20
When the “Write () function” 7, 208 is called, the address information (address value) is decoded in the function, and after calculating the expected register information, the argument (data) is assigned to the variable corresponding to the address information. ) Is substituted. After that, when certain conditions are satisfied, the hardware models 207 and 208 are activated and terminated. The hardware models 207 and 208 are activated by the CPU model 201.
In order to register that the hardware models 207 and 208 are activated. If certain conditions are met, for example, there are registers that prevent rewriting during operation.

【0015】図14は従来のシミュレータにおけるハー
ドウェアモデル207,208の「Read()関数」
例を説明するための図である。図14において、ハード
ウェアモデル207,208は、シミュレーションの最
適化のために、「Read()関数」にアクセスされ、
かつ、一定の条件になると、レジスタ情報の読み込みな
らず、他の機能が動作する場合がある。この図14の例
では、割り込みステータスレジスタデータが読み込まれ
た場合、その値が論理値「1」の場合に割り込みステー
タスを送出(イベント通知)するようになっている。ハ
ードウェアモデルの「Read()関数」が呼び出され
ると、その関数中でアドレス情報のデコードを行う。こ
のデコードでレジスタ情報を算出した後に、因数(da
ta)に代入する。次に、呼び出されたレジスタ情報
(レジスタ値)を調べる。この調べで条件に当てはまる
ならば、割り込みイベントを送出する。
FIG. 14 is a "Read () function" of the hardware models 207 and 208 in the conventional simulator.
It is a figure for explaining an example. In FIG. 14, the hardware models 207 and 208 are accessed by the “Read () function” for optimization of simulation,
In addition, under certain conditions, the register information may not be read and other functions may operate. In the example of FIG. 14, when the interrupt status register data is read, if the value is a logical value "1", the interrupt status is sent (event notification). When the "Read () function" of the hardware model is called, the address information is decoded in the function. After calculating the register information by this decoding, the factor (da
Substitute in ta). Next, the called register information (register value) is checked. If this check satisfies the condition, an interrupt event is sent.

【0016】図15は従来のシミュレータ動作のさらに
他の例を説明するためのブロック図である。図15にお
いて、このシミュレータ動作例は、CPUモデル201
からメモリモデル206へのアクセス状態と、モニタ2
02からのメモリモデル206のアクセス状態を示して
いる。この両方のアクセスでは、アドレスデコーダ20
3を通じて同一のメモリモデル206の「Read()
関数」又は「Write()関数」を呼び出している。
「Read()関数」が呼び出された場合は、引数とし
て与えられたアドレス情報(アドレス値)を関数内でデ
コードし、該当するメモリモデル206の変数を導き出
し、その値を引数として与えられた変数に代入する。
FIG. 15 is a block diagram for explaining still another example of the conventional simulator operation. In FIG. 15, this simulator operation example is a CPU model 201.
From memory to memory model 206 and monitor 2
02 shows the access state of the memory model 206 from 02. For both accesses, the address decoder 20
The same memory model 206 “Read ()
Function "or" Write () function "is called.
When the "Read () function" is called, the address information (address value) given as an argument is decoded in the function, the variable of the corresponding memory model 206 is derived, and the value is given as the argument. To.

【0017】一方、「Write()関数」が呼び出さ
れた場合は、引数として与えられたアドレス情報(アド
レス値)を関数内でデコードし、該当するメモリモデル
206の変数を導き出す。この導出において、変数に引
数として与えられた値を代入する。また、メモリモデル
206の「Read()関数」、「Write()関
数」にアクセスを行った際には、メモリモデル206に
よってキャッシュメモリモデル204にもアクセスを行
った情報が同時に伝えられ、キャッシュメモリモデル2
04は、適宜、キャッシュ内容を変更し、また、キャッ
シュヒット・ミスヒット情報を変更し、さらには、メモ
リモデル206にキャッシュヒット・ミスヒット情報を
返送している。
On the other hand, when the "Write () function" is called, the address information (address value) given as an argument is decoded in the function to derive the variable of the corresponding memory model 206. In this derivation, the value given as an argument is substituted for the variable. Further, when the “Read () function” and “Write () function” of the memory model 206 are accessed, the information accessed is also transmitted to the cache memory model 204 by the memory model 206 at the same time. Model 2
Reference numeral 04 appropriately changes the cache contents, changes the cache hit / miss hit information, and further returns the cache hit / miss hit information to the memory model 206.

【0018】メモリモデル206から読み込みが行われ
た場合には、キャッシュメモリモデル204の「Cac
he_Read()関数」が呼び出され、読み込まれた
メモリアドレス内容が、キャッシュメモリモデル204
内に存在するかを調べる。このとき、アドレスデコーダ
203は、メモリモデル206からキャッシュメモリモ
デル204にヒットしたか否かを示す戻り値を受け取っ
た後に、その情報に基づいてCPUモデル201がメモ
リモデル206に読み込まれるまでの時間を算出する。
読み込みが終了する時間では、CPUモデル201が次
の命令を読み込むことができないようにシミュレーショ
ン実行部へ、その指示を行う。
When data is read from the memory model 206, "Cac" of the cache memory model 204 is read.
The “he_Read () function” is called, and the read memory address contents are the cache memory model 204.
Check if it exists inside. At this time, after the address decoder 203 receives a return value indicating whether or not the cache memory model 204 is hit from the memory model 206, the address decoder 203 waits until the CPU model 201 is read into the memory model 206 based on the information. calculate.
At the time when reading is completed, the CPU model 201 gives an instruction to the simulation executing unit so that the next instruction cannot be read.

【0019】一方、メモリモデル206に書き込みが行
われた場合には、キャッシュメモリモデル204の「C
ache_Write()関数」が呼び出され、書き込
まれたメモリアドレス内容がキャッシュメモリモデル2
04に存在するかを調べる。存在しない場合は、キャッ
シュメモリモデル204の内容を書き替える。このと
き、アドレスデコーダ203は、メモリモデル206か
らキャッシュメモリモデル204にヒットしたか否かの
戻り値を受けた後に、その情報に基づいてCPUモデル
201がメモリモデル206に書き込みが終了するまで
の間では、CPUモデル201が次の命令を読み込めな
いようにシミュレーション実行部に、その指示を行う。
On the other hand, when data is written in the memory model 206, "C" of the cache memory model 204 is written.
The "ache_Write () function" is called, and the written memory address contents are the cache memory model 2
Check if it exists in 04. If it does not exist, the contents of the cache memory model 204 are rewritten. At this time, the address decoder 203 receives the return value indicating whether the cache memory model 204 is hit from the memory model 206, and thereafter, based on the information, until the CPU model 201 finishes writing to the memory model 206. Then, the CPU model 201 instructs the simulation execution unit so that the next instruction cannot be read.

【0020】図16は従来のシミュレータ動作のさらに
他の例を説明するためのブロック図である。図16にお
いて、このシミュレータ動作例は、CPUモデル201
からキャッシュメモリモデル204へのアクセス状態
と、モニタ202からのキャッシュメモリモデル204
へのアクセス状態を示している。このシミュレータのキ
ャッシュメモリモデル204は、図示しない実際のキャ
ッシュメモリとは異なって、このキャッシュメモリ内容
と、そのキャッシュメモリのアドレス情報を保持してお
らず、メモリ(メモリモデル206)のアドレス情報の
みを保持していて、アドレス情報で示されるメモリ内容
によってメモリモデル206(図示せず)に直接アクセ
スする。すなわち、キャッシュがヒットした際に、ヒッ
トしたことを示す情報をアドレスデコーダ203に返送
するのみである。また、キャッシュがヒットしない場合
は、新たにキャッシュメモリの情報を書き替えるのみで
ある。
FIG. 16 is a block diagram for explaining still another example of the conventional simulator operation. In FIG. 16, this simulator operation example is a CPU model 201.
From the monitor 202 to the cache memory model 204 from the monitor 202
Indicates the access status to. Unlike the actual cache memory (not shown), the cache memory model 204 of this simulator does not hold the contents of this cache memory and the address information of the cache memory, but only the address information of the memory (memory model 206). The memory model 206 (not shown) which is held and directly accessed by the memory contents indicated by the address information is directly accessed. That is, when the cache hits, only the information indicating the hit is returned to the address decoder 203. If the cache does not hit, the information in the cache memory is simply rewritten.

【0021】CPUモデル201からアクセスを行う場
合、及びモニタ202からアクセスする場合に同一のキ
ャッシュメモリモデル204の「Read()関数」、
「Write()関数」を呼び出している。「Read
()関数」が呼び出された場合は、関数内で引数として
与えられたアドレス情報(アドレス値)をデコードし、
キャッシュメモリモデル204のいずれの部分を示して
いるかを算出する。そして、そのキャッシュメモリモデ
ル204が、このキャッシュメモリ全体におけるいずれ
の部分を示しているかを算出する。さらに、そのキャッ
シュメモリモデル204が、このキャッシュメモリ全体
における、いずれの部分に対するキャッシュであるかの
情報、すなわち、アドレス情報(アドレス値)を引数と
して与えられた変数に代入する。
The "Read () function" of the same cache memory model 204 when accessing from the CPU model 201 and when accessing from the monitor 202,
The "Write () function" is called. "Read
() Function "is called, the address information (address value) given as an argument in the function is decoded,
It is calculated which part of the cache memory model 204 is shown. Then, it is calculated which part of the entire cache memory the cache memory model 204 shows. Further, the cache memory model 204 substitutes information about which part of the entire cache memory is the cache, that is, address information (address value) into a variable given as an argument.

【0022】一方、「Write()関数」が呼び出さ
れた場合には、関数内で、そのアドレス情報(アドレス
値)をデコードし、キャッシュメモリモデル204のど
の部分を示しているかを算出する。そして、引数で与え
られた値を代入する。「Read()関数」及び「Wr
ite()関数」が呼び出された場合、キャッシュメモ
リモデル204は、キャッシュがヒットしたか否かを
「Cache_Count()関数」に伝え、この「C
ache_Count()関数」でキャッシュヒット回
数及びキャッシュミスヒット回数の統計情報を作成す
る。この時間は、モニタ202から要求があった場合
に、この情報をモニタ202に通知する。
On the other hand, when the "Write () function" is called, the address information (address value) is decoded in the function to calculate which part of the cache memory model 204 is shown. Then, the value given by the argument is substituted. "Read () function" and "Wr
When the "ite () function" is called, the cache memory model 204 informs the "Cache_Count () function" whether or not the cache is hit, and this "C
The ache_Count () function "is used to create statistical information on the number of cache hits and the number of cache misses. This time informs the monitor 202 of this information if requested by the monitor 202.

【0023】[0023]

【発明が解決しようとする課題】このような上記従来例
では、次の不都合があり、高速かつ確実なシミュレータ
動作(全体・総合的な動作検証シミュレーション)を得
るために、その改善が課題であった。
The above-mentioned conventional example has the following inconveniences, and its improvement is a problem in order to obtain a high-speed and reliable simulator operation (entire and comprehensive operation verification simulation). It was

【0024】(1)シミュレータの高速化のためにハー
ドウェアモデルが、「Write()関数」によって動
作を開始し又は終了し、あるいは「Read()関数」
によって割り込みを送出する。この場合、その区別によ
る動作ができず、ハードウェアモデルやシミュレータ全
体で誤動作が発生するという問題が生じる。 (2)動作中にレジスタへの書き込みを禁止しているハ
ードウェアモデルがある。このようなハードウェアモデ
ルの「Read()関数」と「Write()関数」に
アクセスしても、そのアクセスを実行できないという情
報のみが与えられる。この結果、レジスタ情報(レジス
タ値)の読み取り、また、変更ができないという問題が
生じる。 (3)メモリモデルに対する読み込みや書き込みを行う
ときに、キャッシュメモリモデルにアクセスしてしまう
ことがあり、さらに、キャッシュメモリモデルに対する
読み込みや書き込みを行うと、そのアクセス数が変更さ
れてしまうという問題が生じる。
(1) In order to speed up the simulator, the hardware model starts or ends its operation by the "Write () function" or the "Read () function".
Sends an interrupt by. In this case, there is a problem that the operation cannot be performed by the distinction, and malfunction occurs in the hardware model and the entire simulator. (2) There is a hardware model in which writing to the register is prohibited during operation. Even if the "Read () function" and "Write () function" of such a hardware model are accessed, only the information that the access cannot be executed is given. As a result, there arises a problem that the register information (register value) cannot be read or changed. (3) When reading or writing to the memory model, the cache memory model may be accessed, and when reading or writing to the cache memory model, the number of accesses changes. Occurs.

【0025】本発明は、以上の点に着目してなされたも
のであり、第1の目的として、ハードウェアモデルへの
アクセスに対する誤動作が発生しなくなるとともに、シ
ミュレーション実行結果が迅速に得られるようになっ
て、結果的に高速かつ確実なシミュレータ動作(全体・
総合的な動作検証シミュレーション)が可能になる、動
作検証シミュレーションの実行方法及びシミュレーショ
ン実行装置並びにプログラムを提供する。
The present invention has been made by paying attention to the above points. As a first object of the present invention, a malfunction for access to a hardware model does not occur and a simulation execution result can be obtained quickly. As a result, high-speed and reliable simulator operation (overall
(EN) Provided are an execution method of an operation verification simulation, a simulation execution device, and a program that enable comprehensive operation verification simulation).

【0026】また、本発明は、第2の目的として、キャ
ッシュメモリモデルへのアクセス時にキャッシュが不当
に変更されるのを防止できるとともに、メモリモデルの
情報が迅速に得られるようになって、結果的に高速かつ
確実なシミュレータ動作が可能になる、動作検証シミュ
レーションの実行方法及びシミュレーション実行装置並
びにプログラムを提供する。
As a second object of the present invention, it is possible to prevent the cache from being inappropriately changed when accessing the cache memory model, and to obtain the information of the memory model quickly. (EN) Provided are an execution method of a motion verification simulation, a simulation execution device, and a program, which enable an extremely high-speed and reliable simulator operation.

【0027】さらに、本発明は、第3の目的として、誤
った統計情報が出力されるのを阻止できるとともに、キ
ャッシュメモリモデルでのキャッシュ情報が迅速に得ら
れるようになって、結果的に高速かつ確実なシミュレー
タ動作が可能になる、動作検証シミュレーションの実行
方法及びシミュレーション実行装置並びにプログラムを
提供する。
Furthermore, as a third object of the present invention, it is possible to prevent incorrect statistical information from being output and to quickly obtain cache information in the cache memory model, resulting in high speed. Provided are an execution method of a motion verification simulation, a simulation execution device, and a program that enable reliable simulator operation.

【0028】[0028]

【課題を解決するための手段】本発明は、制御系の処理
をモデル化した制御系モデルと、入力操作及び出力表示
によるシミュレーション制御を実行するためのモニタ
と、シミュレーション対象装置におけるハードウェアを
モデル化したハードウェアモデルとを有して動作検証シ
ミュレーションを実行する方法において、前記制御系モ
デルからの前記ハードウェアモデルへのアクセスによっ
て、第1関数を呼び出すステップと、前記モニタからの
前記ハードウェアモデルへのアクセスによって、第2関
数を呼び出すステップと、該第2関数の指示に基づいて
第1関数の所定の命令を前記ハードウェアモデルに対し
て実行するステップと、を有することを特徴とする。
According to the present invention, a control system model modeling the processing of a control system, a monitor for executing a simulation control by an input operation and an output display, and a model of hardware in a device to be simulated are provided. A method for executing a behavioral verification simulation having a simplified hardware model, the step of calling a first function by accessing the hardware model from the control system model, and the hardware model from the monitor. Access to the second function, and executing a predetermined instruction of the first function with respect to the hardware model based on an instruction of the second function.

【0029】また、他の発明の動作検証シミュレーショ
ンの実行方法は、制御系の処理をモデル化した制御系モ
デルと、入力操作及び出力表示によるシミュレーション
制御を実行するためのモニタと、シミュレーション対象
装置におけるハードウェアをモデル化したハードウェア
モデルとを有して動作検証シミュレーションを実行する
ものであり、前記制御系モデルからの前記ハードウェア
モデルへのアクセスによって、第1関数を呼び出すステ
ップと、前記第1関数によって前記ハードウェアモデル
に対する起動及び終了を含む処理を行い、かつ、書き込
み及び読み込みの処理を実行するステップと、前記モニ
タからの前記ハードウェアモデルへのアクセスによっ
て、第2関数を呼び出すステップと、前記第2関数によ
って前記第1関数よりも処理数が低減するとともに、前
記ハードウェアモデルに対する起動及び終了を含む処理
を行わずに読み込み処理のみを実行するステップとを有
することを特徴としている。
Further, the execution method of the operation verification simulation of another invention is a control system model in which the processing of the control system is modeled, a monitor for executing simulation control by input operation and output display, and a simulation target device. And a hardware model modeling hardware to execute an operation verification simulation, and a step of calling a first function by accessing the hardware model from the control system model; Performing a process including starting and ending with respect to the hardware model by a function, and executing a process of writing and reading, and calling a second function by accessing the hardware model from the monitor, The second function is different from the first function. With the number of the process is also reduced, it is characterized by a step of performing only the activation and reading process without performing processing including termination for the hardware model.

【0030】上記した発明の方法では、第1関数と第2
関数の区分けした処理によって、ハードウェアモデルへ
のアクセスに対する誤動作が生じなくなるとともに、シ
ミュレーション実行結果が迅速に得られるようになっ
て、結果的に高速かつ確実なシミュレータ動作(全体・
総合的な動作検証シミュレーション)が可能になる。
In the method of the invention described above, the first function and the second function
Due to the divided processing of functions, malfunctions due to access to the hardware model do not occur, and simulation execution results can be obtained quickly, resulting in fast and reliable simulator operation (overall
Comprehensive operation verification simulation) is possible.

【0031】さらに、本発明の動作検証シミュレーショ
ンの実行方法は、制御系の処理をモデル化した制御系モ
デルと、入力操作及び出力表示によるシミュレーション
制御を実行するためのモニタと、キャッシュメモリをモ
デル化したキャッシュメモリモデルと、前記制御系モデ
ルが実行するファームウェアプログラムが格納されると
ともにメモリをモデル化したメモリモデルと、シミュレ
ーション対象装置におけるハードウェアをモデル化した
ハードウェアモデルとを有して動作検証シミュレーショ
ンを実行するものであり、前記制御系モデルからの前記
メモリモデルへのアクセスによって、第1関数を呼び出
すステップと、前記第1関数によって、前記キャッシュ
メモリモデルへの書き込み及び読み込みを含む処理を実
行するステップと、前記モニタからの前記メモリモデル
へのアクセスによって、第2関数を呼び出すステップ
と、前記第2関数によって、前記メモリモデルから前記
キャッシュメモリモデルに、アクセス情報を通知して前
記キャッシュメモリモデル内容を変更し、かつ、キャッ
シュヒット・ミスヒット情報の変更を行い、さらに前記
メモリモデル情報を返送する処理を実行するステップと
を有することを特徴としている。
Further, the operation verification simulation execution method of the present invention models a control system model that models the processing of the control system, a monitor for executing simulation control by input operation and output display, and a cache memory. And a cache memory model, a memory model in which the firmware program executed by the control system model is stored and a memory model, and a hardware model in which the hardware of the simulation target device is modeled are verified. And calling a first function by accessing the memory model from the control system model, and executing a process including writing and reading into the cache memory model by the first function. With steps Calling a second function by accessing the memory model from the monitor, and notifying access information from the memory model to the cache memory model to change the contents of the cache memory model by the second function. In addition, the cache hit / miss hit information is changed, and a process of returning the memory model information is executed.

【0032】上記した発明の方法では、第1関数と第2
関数の区分けした処理によって、キャッシュメモリモデ
ルにアクセスが行われた際にキャッシュが不当に変更さ
れるのを防止できるとともに、メモリモデルの情報が迅
速に得られるようになって、結果的に高速かつ確実なシ
ミュレータ動作が可能になる。
In the method of the invention described above, the first function and the second function
By dividing the functions, it is possible to prevent the cache from being changed illegally when the cache memory model is accessed, and to obtain the information of the memory model quickly, resulting in high speed and high speed. Enables reliable simulator operation.

【0033】本発明の動作検証シミュレーションの実行
方法は、制御系の処理をモデル化した制御系モデルと、
入力操作及び出力表示によるシミュレーション制御を実
行するためのモニタと、前記制御系モデルが実行するフ
ァームウェアプログラムが格納されるとともにメモリを
モデル化したメモリモデルと、キャッシュメモリをモデ
ル化したキャッシュメモリモデルとを有して動作検証シ
ミュレーションを実行するものであり、前記制御系モデ
ルからの前記キャッシュメモリモデルへのアクセスによ
って、第1関数を呼び出すステップと、前記第1関数に
よって前記キャッシュメモリモデルの内容変更を行うと
ともにキャッシュヒット・ミスヒットの統計情報を変更
する処理を実行するステップと、前記第1関数の呼び出
しによって、前記キャッシュメモリモデルが、キャッシ
ュヒット・ミスヒットを第3関数に通知する処理を実行
するステップと、この第3関数によって統計情報を作成
するとともに、この統計情報を前記モニタからの要求に
よって、前記キャッシュメモリモデルから通知する処理
を実行するステップと、前記モニタからの前記キャッシ
ュメモリモデルへのアクセスによって、第2関数を呼び
出すステップと、前記第2関数により前記第1関数とは
異なって統計情報を変更しないとともに、前記キャッシ
ュメモリモデルの内容変更を行わずに参照のみを行う処
理を実行するステップとを有することを特徴としてい
る。
The operation verification simulation execution method of the present invention comprises: a control system model that models the processing of the control system;
A monitor for executing simulation control by input operation and output display, a memory model storing a firmware program executed by the control system model and modeling a memory, and a cache memory model modeling a cache memory. And executing an operation verification simulation, invoking a first function by accessing the cache memory model from the control system model, and changing the contents of the cache memory model by the first function. And a step of changing the cache hit / miss hit statistical information, and a step of causing the cache memory model to notify the third function of the cache hit / miss hit by calling the first function. When, By creating statistical information by the third function of, and executing a process of notifying the statistical information from the cache memory model in response to a request from the monitor; and accessing the cache memory model from the monitor, Different from the first function, the second function is called, and the second function is different from the first function in that the statistical information is not changed and only the reference is executed without changing the contents of the cache memory model. It is characterized by having.

【0034】上記した発明の方法では、第1関数と第2
関数の区分けした処理と第3関数による処理によって、
誤った統計情報が出力されるのを阻止できるとともに、
キャッシュメモリモデルにキャッシュされている情報が
迅速に得られるようになって、結果的に高速かつ確実な
シミュレータ動作が可能になる。
In the method of the invention described above, the first function and the second function
By the processing divided into functions and the processing by the third function,
It is possible to prevent the output of incorrect statistical information,
The information cached in the cache memory model can be quickly obtained, and as a result, high-speed and reliable simulator operation becomes possible.

【0035】上記発明の方法において、第1関数及び第
2関数並びに第3関数がオブジェクト指向構造化プログ
ラミング言語であることを特徴としている。
The method of the invention is characterized in that the first function, the second function and the third function are object-oriented structured programming languages.

【0036】本発明のシミュレーション実行装置は、動
作検証シミュレーションを実行するものであり、制御系
の処理をモデル化した制御系モデル部と、入力操作及び
出力表示によるシミュレーション制御を実行するための
モニタ部と、シミュレーション対象装置におけるハード
ウェアをモデル化したハードウェアモデル部とを有し、
前記制御系モデル部からの前記ハードウェアモデル部へ
のアクセスで呼び出した第1関数によって前記ハードウ
ェアモデル部に対する起動及び終了を含む処理を行い、
かつ、書き込み及び読み込みの処理を実行し、前記モニ
タ部からの前記ハードウェアモデル部へのアクセスで呼
び出した第2関数によって前記第1関数よりも処理数が
低減するとともに、前記ハードウェアモデル部に対する
起動及び終了を含む処理を行わずに読み込み処理のみを
実行することを特徴としている。
The simulation execution apparatus of the present invention executes a motion verification simulation, and includes a control system model section that models the processing of the control system and a monitor section that executes simulation control by input operation and output display. And a hardware model part that models the hardware in the simulation target device,
The first function called by the access to the hardware model section from the control system model section performs a process including activation and termination of the hardware model section,
Moreover, the number of processes is reduced as compared to the first function by the second function called by the access to the hardware model section from the monitor section by executing the writing and reading processes, and the hardware model section is processed. The feature is that only the reading process is executed without performing the process including the start and the end.

【0037】また、本発明のシミュレーション実行装置
は、動作検証シミュレーションを実行するものであり、
制御系の処理をモデル化した制御系モデル部と、入力操
作及び出力表示によるシミュレーション制御を実行する
ためのモニタ部と、キャッシュメモリモデル部と、制御
系モデル部が実行するファームウェアプログラムが格納
されるメモリモデル部と、シミュレーション対象装置に
おけるハードウェアをモデル化したハードウェアモデル
部とを有し、前記制御系モデル部からの前記メモリモデ
ル部へのアクセスによって呼び出した前記第1関数によ
って、前記キャッシュメモリモデル部への書き込み及び
読み込みを含む処理を実行し、前記モニタ部からの前記
メモリモデル部へのアクセスによって呼び出した前記第
2関数によって、前記メモリモデル部から前記キャッシ
ュメモリモデル部に、アクセス情報を通知して前記キャ
ッシュメモリモデル部の内容を変更し、かつ、キャッシ
ュヒット・ミスヒット情報の変更を行い、さらに前記メ
モリモデル部の情報を返送する処理を実行することを特
徴としている。
The simulation executing apparatus of the present invention executes an operation verification simulation,
A control system model part modeling the processing of the control system, a monitor part for executing simulation control by input operation and output display, a cache memory model part, and a firmware program executed by the control system model part are stored. The cache memory has a memory model unit and a hardware model unit that models the hardware in the simulation target device, and the first function called by the access from the control system model unit to the memory model unit Access information from the memory model unit to the cache memory model unit is executed by the second function called by executing a process including writing and reading into the model unit and accessing the memory model unit from the monitor unit. Notify the cache memory model Change the contents of the section, and is characterized in that to execute a process to change the cache hit miss information and further returns the information of the memory model unit.

【0038】さらに、本発明のシミュレーション実行装
置は、動作検証シミュレーションを実行するものであ
り、制御系の処理をモデル化した制御系モデル部と、入
力操作及び出力表示によるシミュレーション制御を実行
するためのモニタ部と、制御系モデル部が実行するファ
ームウェアプログラムが格納されたメモリモデル部と、
キャッシュメモリをモデル化したキャッシュメモリモデ
ル部とを有し、前記制御系モデル部から前記キャッシュ
メモリモデル部へのアクセスで呼び出した第1関数によ
って前記キャッシュメモリモデル部の内容変更を行うと
ともに、キャッシュヒット・ミスヒットの統計情報を変
更する処理を実行し、かつ、前記キャッシュメモリモデ
ル部が、キャッシュヒット・ミスヒット情報を第3関数
に通知して統計情報を作成し、この統計情報を前記モニ
タ部からの要求によって通知する処理を実行し、かつ、
前記モニタ部から前記キャッシュメモリモデル部へのア
クセスで呼び出した第2関数によって、前記第1関数と
は異なり統計情報の変更を行わないとともに前記キャッ
シュメモリモデル部の内容変更を行わず参照のみを行う
処理を実行することを特徴としている。
Further, the simulation executing apparatus of the present invention executes the operation verification simulation, and is for executing the simulation control by the control system model part modeling the processing of the control system and the input operation and the output display. A monitor unit, a memory model unit in which a firmware program executed by the control system model unit is stored,
A cache memory model part that models a cache memory, and changes the contents of the cache memory model part by a first function called by the access from the control system model part to the cache memory model part, and a cache hit -A process for changing the statistical information of the mishit is executed, and the cache memory model unit notifies the third function of the cache hit / mishit information to create the statistical information, and the statistical information is provided to the monitor unit. Executes the process to be notified by the request from
Unlike the first function, the second function called by the access from the monitor unit to the cache memory model unit does not change the statistical information and does not change the contents of the cache memory model unit and only refers. It is characterized by executing processing.

【0039】これらの発明の装置では、前記した装置の
発明と同様に、第1関数と第2関数の区分けした処理に
よって、結果的に高速かつ確実なシミュレータ動作(全
体・総合的な動作検証シミュレーション)が可能にな
る。
In the devices of these inventions, similarly to the inventions of the above-mentioned devices, by the divided processing of the first function and the second function, as a result, a high-speed and reliable simulator operation (entire / total operation verification simulation) is performed. ) Is possible.

【0040】本発明のプログラムでは、制御系モデルか
らのハードウェアモデルへのアクセスによって呼び出し
た第1関数によってハードウェアモデルに対する起動及
び終了を含む処理を行い、かつ、書き込み及び読み込み
の処理を実行する制御と、モニタからのハードウェアモ
デルへのアクセスによって呼び出した 第2関数によっ
て第1関数よりも処理数が低減するとともにハードウェ
アモデルを起動及び終了を含む処理を行わずに読み込み
処理のみを実行する制御とを実質的なコンピュータが実
行するものである。
In the program of the present invention, the first function called by the access to the hardware model from the control system model performs the processing including the activation and termination of the hardware model, and the writing and reading processing. The second function called by the control and the access to the hardware model from the monitor reduces the number of processes as compared with the first function, and executes only the read process without performing the process including starting and ending the hardware model. The control is substantially executed by a computer.

【0041】また、本発明のプログラムでは、制御系モ
デルからのメモリモデルへのアクセスによって呼び出し
た第1関数によって、キャッシュメモリモデルへの書き
込み及び読み込みを含む処理を実行する制御と、モニタ
からのメモリモデルへのアクセスで呼び出した第2関数
によって、メモリモデルからキャッシュメモリモデル
に、アクセス情報を通知してキャッシュメモリモデル内
容を変更し、かつ、キャッシュヒット・ミスヒット情報
の変更を行い、さらにメモリモデル情報を返送する処理
を実行する制御とを実質的なコンピュータが実行するも
のである。
Further, in the program of the present invention, the first function called by the access to the memory model from the control system model executes the control including the writing and reading in the cache memory model, and the memory from the monitor. The memory model notifies the cache memory model of the access information by the second function called by accessing the model to change the contents of the cache memory model, and changes the cache hit / miss hit information. The substantial computer executes the control for executing the process of returning the information.

【0042】さらに、本発明のプログラムでは、制御系
モデルからのキャッシュメモリモデルへのアクセスによ
って呼び出した第1関数によってキャッシュメモリモデ
ルの内容変更を行うとともに、キャッシュヒット・ミス
ヒットの統計情報を変更する処理を実行する制御と、第
1関数の呼び出しによって、キャッシュメモリモデル
が、キャッシュヒット・ミスヒットを第3関数に通知す
る処理を実行する制御と、第3関数によって統計情報を
作成するとともに、この統計情報をモニタからの要求に
よってキャッシュメモリモデルから通知する処理を実行
する制御と、モニタからのキャッシュメモリモデルへの
アクセスによって呼び出した第2関数によって第1関数
とは異なり統計情報を変更しないとともにキャッシュメ
モリモデルの内容変更を行わずに参照のみを行う処理を
実行する制御とを実質的なコンピュータが実行するもの
である。
Further, in the program of the present invention, the contents of the cache memory model are changed by the first function called by the access to the cache memory model from the control system model, and the statistical information of cache hit / miss hit is changed. The control for executing the processing, the control for executing the processing for the cache memory model to notify the third function of the cache hit / miss hit by the call of the first function, and the statistical information creation by the third function, Unlike the first function, the cache does not change the statistical information by the control that executes the processing of notifying the statistical information from the cache memory model in response to the request from the monitor and the second function called by the access to the cache memory model from the monitor. Memory model contents change In which substantial computer executes a control for executing the processing for reference only without.

【0043】上記した本発明のプログラムでは、本発明
を、情報記録媒体、例えば、パッケージソフトウェアと
して提供可能になり、本発明の全体・総合的な動作検証
シミュレーションがコンピュータや専用装置で実行でき
るようになって、その汎用性が向上する。
With the above-mentioned program of the present invention, the present invention can be provided as an information recording medium, for example, package software, so that the whole / total operation verification simulation of the present invention can be executed by a computer or a dedicated device. Therefore, its versatility is improved.

【0044】[0044]

【発明の実施の形態】次に、本発明の動作検証シミュレ
ーションの実行方法及びシミュレーション実行装置並び
にプログラムの実施形態を図面参照の上で詳細に説明す
る。なお、以下にあって従来例で参照した一部の図を重
複参照して説明する。 (第1実施形態)この第1実施形態は、前記した第1の
目的(シミュレータのモニタからのアクセスに対する誤
動作の阻止と処理結果を迅速に知る)に対応する。図1
は第1実施形態におけるシミュレータの構成を示すブロ
ック図である。図1において、この第1実施形態のシミ
ュレータは、電子装置のCPU(請求項における制御系
に対応)をモデル化したCPUモデル101(請求項に
おける制御系モデル部に対応/以下の第2及び第3実施
形態も同じ)と、シミュレーション制御を実行するため
のモニタ102(請求項におけるモニタ部に対応/以下
の第2及び第3実施形態も同じ)と、アドレスデコーダ
103(請求項におけるアドレスデコーダ部に対応/以
下の第2及び第3実施形態も同じ)と、電子装置内部の
キャッシュメモリをモデル化したキャッシュメモリモデ
ル104(請求項におけるキャッシュメモリモデルに対
応/以下の第2及び第3実施形態も同じ)とを有してい
る。
BEST MODE FOR CARRYING OUT THE INVENTION Next, an embodiment of an operation verification simulation executing method, a simulation executing apparatus, and a program of the present invention will be described in detail with reference to the drawings. The following description will be given with reference to some of the drawings referred to in the conventional example. (First Embodiment) This first embodiment corresponds to the above-described first purpose (prevention of malfunction due to access from the monitor of the simulator and quick knowledge of the processing result). Figure 1
FIG. 3 is a block diagram showing a configuration of a simulator in the first embodiment. In FIG. 1, the simulator of the first embodiment is a CPU model 101 (corresponding to a control system model portion in claims) which is a model of a CPU (corresponding to a control system in claims) of the electronic device. The same applies to the third embodiment), a monitor 102 for executing simulation control (corresponding to a monitor unit in claims / the same applies to the second and third embodiments below), and an address decoder 103 (address decoder unit in claims). Corresponding to / same as the following second and third embodiments), and a cache memory model 104 modeling a cache memory inside an electronic device (corresponding to the cache memory model in claims / the following second and third embodiments) The same).

【0045】さらに、このシミュレータは、電子装置の
各種機能をモデル化したデバイスモデル部105(請求
項におけるデバイスモデル部に対応/以下の第2及び第
3実施形態も同じ)を有し、このデバイスモデル部10
5には、CPUモデル101が実行するファームウェア
プログラムが格納され、また、電子装置の記憶電子装置
であるメモリをモデル化したメモリモデル106(請求
項におけるメモリモデル部に対応/以下の第2及び第3
実施形態も同じ)と、電子装置の各機能をモデル化した
複数のハードウェアモデル107,108(請求項にお
けるハードウェアモデルに対応/以下の第2及び第3実
施形態も同じ)とを有している。
Further, this simulator has a device model section 105 (corresponding to the device model section in the claims / the same applies to the second and third embodiments below) that models various functions of the electronic device. Model part 10
5, a firmware program executed by the CPU model 101 is stored, and a memory model 106 that models a memory that is a storage electronic device of the electronic device (corresponds to the memory model portion in the claims / the following second and second Three
The same applies to the embodiment) and a plurality of hardware models 107 and 108 (each corresponding to the hardware model in the claims / the same applies to the second and third embodiments below) that models each function of the electronic device. ing.

【0046】モニタ102は、シミュレータを使用して
シミュレーションを行うユーザとのマンマシンインタフ
ェースであり、例えば、入力操作装置と出力装置及び表
示装置(キーボード、プリンタ、CRT/LCD装置)
とからなり、シミュレーション実行を制御する。このモ
ニタ102では、シミュレーション実行時に次の処理を
実行する。 (1)ファームウェアプログラム中へのブレークポイン
トの設定及び解除 (2)シミュレーションの開始、中断、終了及びステッ
プ実行 (3)ハードウェアのレジスタ情報と、メモリモデル1
06、キャッシュメモリモデル104及びCPUモデル
101へのレジスタ情報(レジスタ値)の書き込み及び
読み込み (4)CPUモデル101が実行するファームウェアプ
ログラムのアッセンブラコードの表示
The monitor 102 is a man-machine interface with a user who performs a simulation using a simulator. For example, an input operation device, an output device, and a display device (keyboard, printer, CRT / LCD device).
And controls the simulation run. The monitor 102 executes the following processing when the simulation is executed. (1) Setting and canceling a breakpoint in the firmware program (2) Start, suspension, end and step execution of simulation (3) Hardware register information and memory model 1
06, writing and reading register information (register value) to the cache memory model 104 and the CPU model 101 (4) Display of assembler code of firmware program executed by the CPU model 101

【0047】また、図1中のそれぞれのモデルはオブジ
ェクト指向の構造化プログラミング言語/「C++」言
語で記述され、それぞれ一つの「Class」となって
いる。キャッシュメモリモデル104以外の図1に示す
それぞれのモデルとモニタ102は、アドレスデコーダ
103を通じて接続され、キャッシュメモリモデル10
4は、モニタ102とCPUモデル101とメモリモデ
ル106と直接接続されている。また、モニタ102と
図1中の前記したそれぞれのモデルが、他のモデルのア
ドレス情報(アドレス値)へのアクセスは、「Read
()関数」又は「Write()関数」(請求項におけ
る第1関数に対応/以下の第2及び第3実施形態も同
じ)を使用して行う。ハードウェアモデル107,10
8には、「Read()関数」及び「Write()関
数」とともに「Monitor_Read()関数」と
「Monitor_Write()関数」(請求項にお
ける第2関数に対応/以下の第2及び第3実施形態も同
じ)とが用意されている。
Each model in FIG. 1 is described in an object-oriented structured programming language / “C ++” language, and each model is one “Class”. The models other than the cache memory model 104 shown in FIG. 1 and the monitor 102 are connected through an address decoder 103, and the cache memory model 10 is connected.
4 is directly connected to the monitor 102, the CPU model 101, and the memory model 106. Further, the monitor 102 and each of the above-described models in FIG. 1 can access the address information (address value) of the other model by “Read
() Function ”or“ Write () function ”(corresponding to the first function in the claims / the same applies to the second and third embodiments below). Hardware model 107, 10
8, a "Read () function" and a "Write () function" as well as a "Monitor_Read () function" and a "Monitor_Write () function" (corresponding to the second function in the claims / the second and third embodiments below). Is also the same) and.

【0048】以下、第1実施形態のシミュレータ動作
(全体・総合的な動作検証シミュレーション)について
説明する。まず、この図1のシミュレータの基本的な動
作について説明する(従来例の図10ステップS301
〜S303参照)。シミュレーションが実行開始される
と、モニタ102の指示によって図1中のハードウェア
モデル107,108及びCPUモデル101などの初
期化を行う。次に、ユーザからのモニタ102への指示
待機状態となる。ここでモニタ102上において、「r
un(restart)」などの指示を受け取ると、モ
ニタ102がシミュレーション実行部(図1に図示せ
ず、例えば、シミュレータとしてコンピュータを用いた
場合の処理モジュール)を呼び出してシミュレーション
を開始(再開)する。
The simulator operation of the first embodiment (entire / total operation verification simulation) will be described below. First, the basic operation of the simulator of FIG. 1 will be described (FIG. 10 step S301 of the conventional example).
~ S303). When the simulation starts to be executed, the hardware models 107 and 108 and the CPU model 101 in FIG. 1 are initialized according to an instruction from the monitor 102. Next, the standby state for an instruction from the user to the monitor 102 is set. Here, on the monitor 102, "r
When receiving an instruction such as “un (restart)”, the monitor 102 calls a simulation execution unit (not shown in FIG. 1, for example, a processing module when a computer is used as a simulator) to start (restart) the simulation.

【0049】このシミュレーション中に、ファームウェ
アプログラムに前記したブレークポイントが設定され、
また、モニタ102からユーザによる中断の指示がある
と、シミュレーションを一時的に中断し、再度モニタ1
02からの指示待ち状態となる。モニタ102におい
て、「Read」や「write」のユーザ指示がある
と、アドレスデコーダ103を通じて、この指示の「R
ead」や「write」が、ハードウェアモデル10
7,108に対する場合、その「Monitor_Wr
ite()関数」又は「Monitor_Read()
関数」を呼び出す。これ以外のモデルは、アドレスデコ
ーダ103を通じて又は直接、「Read()関数」又
は「Write()関数」を呼び出し、ユーザ指示が
「Read」の場合、その結果をモニタ102に返送す
る。また、ユーザ指示が「end」の場合、シミュレー
ションが終了する。
During this simulation, the above-mentioned breakpoints are set in the firmware program,
Also, when the user instructs the monitor 102 to suspend, the simulation is temporarily suspended and the monitor 1 is restarted.
It will be in a state of waiting for an instruction from 02. When there is a user instruction of “Read” or “write” on the monitor 102, the “R” of this instruction is given through the address decoder 103.
"ead" and "write" are hardware model 10
In the case of 7,108, the "Monitor_Wr
ite () function "or" Monitor_Read () "
Function ". Other models call the “Read () function” or the “Write () function” through the address decoder 103 or directly, and when the user instruction is “Read”, the result is returned to the monitor 102. If the user instruction is "end", the simulation ends.

【0050】次に、上記のシミュレーション実行部の内
容について説明する(従来例の図11ステップS401
〜S407まで参照)。図1に示すモニタ102からシ
ミュレーション実行部が呼び出されると、まず、シミュ
レータにおける一つのシステムクロック信号を進め、C
PUモデル101が、メモリモデル106から命令の読
み込みが可能な場合、CPUモデル101がメモリモデ
ル106から、実行する命令を読み込む。そして、この
命令を解釈した後に、その解釈の命令を実行する。この
命令実行の後に、CPUモデル101から外部アクセス
があるか、又はハードウェアモデル107,108の実
行を処理するかを調べる。この調べで、必要ならばハー
ドウェアモデル107又は108の実行を処理する。そ
して、実行した命令位置にブレークポイントが設定され
ているか、又はモニタ102から終了や中断の命令が有
るかを調べる。条件によっては、シミュレーション実行
部は、その実行を終了してモニタ102における実行に
戻る。
Next, the contents of the above-mentioned simulation execution unit will be explained (FIG. 11 step S401 of the conventional example).
Up to S407). When the simulation executing unit is called from the monitor 102 shown in FIG. 1, first, one system clock signal in the simulator is advanced, and C
When the PU model 101 can read an instruction from the memory model 106, the CPU model 101 reads an instruction to be executed from the memory model 106. Then, after interpreting this instruction, the instruction of the interpretation is executed. After execution of this instruction, it is checked whether there is external access from the CPU model 101 or whether the execution of the hardware models 107 and 108 is processed. This check handles the execution of the hardware model 107 or 108 if necessary. Then, it is checked whether a breakpoint is set at the executed instruction position or whether there is a termination or interruption instruction from the monitor 102. Depending on the conditions, the simulation executing unit ends the execution and returns to the execution in the monitor 102.

【0051】このとき、CPUモデル101の図示しな
いレジスタ情報、メモリモデル106の内容、ハードウ
ェアモデル107,108のレジスタ情報(レジスタ
値)が保持される。シミュレーション実行部が、その実
行を終了しない場合、再度システムクロック信号を進め
て、命令を読み込んで、シミュレーションを順次実行す
る。
At this time, the register information (not shown) of the CPU model 101, the contents of the memory model 106, and the register information (register value) of the hardware models 107 and 108 are held. When the simulation execution unit does not finish the execution, it advances the system clock signal again, reads the instruction, and sequentially executes the simulation.

【0052】次に、上記したシミュレータ基本動作に基
づく本発明のシミュレータ動作(全体・総合的な動作検
証シミュレーション)について説明する。図2は第1実
施形態のシミュレータ動作を説明するためのブロック図
である。図1及び図2において、このシミュレータ動作
例は、CPUモデル101からハードウェアのレジスタ
情報へのアクセス状態とモニタ102からデバイスモデ
ル部105におけるハードウェアモデルのレジスタ情報
へのアクセス状態を示している。CPUモデル101が
デバイスモデル部105におけるハードウェアモデルの
レジスタ情報にアクセスを行う場合、アドレスデコーダ
103によって、アクセスするハードウェアモデル10
7,108を選択決定した後に、「Read()関数」
又は「Write()関数」を呼び出す。
Next, the simulator operation of the present invention based on the above-described simulator basic operation (overall / total operation verification simulation) will be described. FIG. 2 is a block diagram for explaining the simulator operation of the first embodiment. 1 and 2, this simulator operation example shows an access state from the CPU model 101 to the register information of the hardware and an access state from the monitor 102 to the register information of the hardware model in the device model unit 105. When the CPU model 101 accesses the register information of the hardware model in the device model unit 105, the hardware model 10 to be accessed by the address decoder 103.
After selecting and deciding 7,108, "Read () function"
Alternatively, the “Write () function” is called.

【0053】一方、モニタ102からのデバイスモデル
部105におけるハードウェアモデルのレジスタ情報に
アクセスを行う場合、CPUモデル101の場合と同様
に、アドレスデコーダ103によってアクセスを行うハ
ードウェアモデル107,108を決定(選択)する。
選択されたハードウェアモデル(107,108のいず
れか)の「Monitor_Write()関数」又は
「Monitor_Read()関数」を呼び出す。
On the other hand, when accessing the register information of the hardware model in the device model section 105 from the monitor 102, the hardware models 107 and 108 to be accessed are determined by the address decoder 103, as in the case of the CPU model 101. (select.
The "Monitor_Write () function" or "Monitor_Read () function" of the selected hardware model (107 or 108) is called.

【0054】次に、図2における「Monitor_W
rite()関数」について説明する。図3は、図2中
の「Monitor_Write()関数」を説明する
ための図である。図3において、モニタ102によっ
て、ハードウェアモデル107,108の「Monit
or_Write()関数」が呼び出されると、この関
数中におけるアドレス情報(アドレス値)のデコードを
行い、期待された所定のレジスタ情報を算出した後に、
このアドレス情報に該当する変数に引数(data)を
代入する。この「Monitor_Write()関
数」では、従来例をもって説明したシミュレータのハー
ドウェアモデルの「Write()関数」のように図1
中のハードウェアモデル107,108を起動させ、か
つ、終了させるなどの処理を行わない。換言すれば、前
記したように誤動作が生じないことになる。さらに、従
来例をもって説明したシミュレータのハードウェアモデ
ルの「Write()関数」のように、書き込みが禁止
されることがないため、いかなる状態においてもハード
ウェアモデル107,108のレジスタ情報に書き込み
を行うことができる。
Next, "Monitor_W" in FIG.
The “write () function” will be described. FIG. 3 is a diagram for explaining the “Monitor_Write () function” in FIG. In FIG. 3, the monitor 102 causes the hardware models 107 and 108 to display “Monitor”.
When the "or_Write () function" is called, the address information (address value) in this function is decoded, and after the expected predetermined register information is calculated,
An argument (data) is assigned to the variable corresponding to this address information. This "Monitor_Write () function" is similar to the "Write () function" of the hardware model of the simulator described in the conventional example, as shown in FIG.
No processing such as activating and terminating the internal hardware models 107 and 108 is performed. In other words, the malfunction does not occur as described above. Further, unlike the “Write () function” of the hardware model of the simulator described in the conventional example, writing is not prohibited, so the register information of the hardware models 107 and 108 is written in any state. be able to.

【0055】次に、図2における「Monitor_R
ead()関数」について説明する。図4は「Moni
tor_Read()関数」を説明するための図であ
る。図4において、モニタ102によって、ハードウェ
アモデル107,108の「Monitor_Read
()関数」が呼び出されると、この関数中におけるアド
レス情報(アドレス値)のデコードを行い、期待された
所定のレジスタ情報(アドレス値)を算出した後に、こ
のアドレス情報の変数に引数(data)を代入する。
この「Monitor_Read()関数」では、従来
のシミュレータのハードウェアモデル107,108の
「Read()関数」のようにレジスタ情報の読み込み
以外の機能を実行していない。したがって、そのハード
ウェアモデル107,108や、その他の図1に示すモ
デルでの誤動作が発生しなくなる。
Next, "Monitor_R" in FIG.
The "ead () function" will be described. Figure 4 shows "Moni
is a diagram for explaining a "tor_Read () function". In FIG. 4, the monitor 102 displays the “Monitor_Read” of the hardware models 107 and 108.
When the "() function" is called, the address information (address value) in this function is decoded, the expected predetermined register information (address value) is calculated, and then the argument of the variable of this address information (data) is calculated. Is substituted.
The "Monitor_Read () function" does not execute any function other than reading the register information, unlike the "Read () function" of the hardware models 107 and 108 of the conventional simulator. Therefore, malfunction does not occur in the hardware models 107 and 108 and other models shown in FIG.

【0056】このように、この第1実施形態では、モニ
タ102からのハードウェアモデル107,108へア
クセス時に、ハードウェアモデル107,108に格納
している「Read()関数又はWrite()関数」
よりも関数内での処理数が低減し、かつ、ハードウェア
モデル107,108を起動及び終了を含む処理を行わ
ないとともに、書き込みが禁止されず、かつ、読み込み
処理のみを実行するための「Monitor_Read
()関数又はMonitor_Write()関数」を
呼び出している。
As described above, in the first embodiment, when the hardware model 107, 108 is accessed from the monitor 102, the "Read () function or Write () function" stored in the hardware model 107, 108 is stored.
"Monitor_Read" for reducing the number of processes in the function, performing no process including activation and termination of the hardware models 107 and 108, prohibiting writing, and executing only read process.
() Function or Monitor_Write () function "is called.

【0057】この結果、この両方の関数を区分けした処
理を通じて、モニタ102からのアクセスに対する誤動
作が生じなくなるとともに、処理結果が迅速に得られる
ようになって、結果的に高速かつ確実なシミュレータ動
作(全体・総合的な動作検証シミュレーション)が可能
になる。
As a result, through the processing in which these two functions are divided, a malfunction due to an access from the monitor 102 does not occur, and the processing result can be obtained quickly, resulting in a fast and reliable simulator operation ( Overall / total operation verification simulation) becomes possible.

【0058】(第2実施形態)この第2実施形態は、前
記した第2の目的(シミュレータのモニタからアクセス
が行われた際のキャッシュメモリモデルの変更防止とメ
モリモデルの情報を迅速に得る)に対応する。図5は第
2実施形態のシミュレータ構成を示すブロック図であ
る。図5において、この第2実施形態は、第1実施形態
と同様のCPUモデル501と、モニタ502と、アド
レスデコーダ503と、キャッシュメモリモデル504
と、デバイスモデル部505とを有し、このデバイスモ
デル部505には、メモリモデル506及び複数のハー
ドウェアモデル507,508とが設けられている。
(Second Embodiment) This second embodiment has the above-mentioned second purpose (prevention of alteration of the cache memory model when accessing from the monitor of the simulator and quick acquisition of memory model information). Corresponding to. FIG. 5 is a block diagram showing the simulator configuration of the second embodiment. 5, the second embodiment is similar to the first embodiment in a CPU model 501, a monitor 502, an address decoder 503, and a cache memory model 504.
And a device model section 505. The device model section 505 is provided with a memory model 506 and a plurality of hardware models 507 and 508.

【0059】モニタ502は、第1実施形態と同様のマ
ンマシンインタフェースであり、シミュレーション実行
時に次の処理を実行する。 (1)ファームウェアプログラム中へのブレークポイン
トの設定及び解除 (2)シミュレーションの開始、中断、終了及びステッ
プ実行 (3)ハードウェアのレジスタ情報と、メモリモデル5
06へのレジスタ情報(レジスタ値)の書き込み及び読
み込み (4)CPUモデル501が実行するファームウェアプ
ログラムのアッセンブラコードの表示
The monitor 502 is a man-machine interface similar to that of the first embodiment, and executes the following processing when executing the simulation. (1) Setting and canceling a breakpoint in the firmware program (2) Start, suspension, end and step execution of simulation (3) Hardware register information and memory model 5
Writing and reading register information (register value) to 06 (4) Display of assembler code of firmware program executed by CPU model 501

【0060】また、図5中のそれぞれのモデルは、第1
実施形態と同様に「C++」言語で記述され、それぞれ
一つの「Class」になっている。キャッシュメモリ
モデル504以外の図5中のモデルとモニタ502は、
アドレスデコーダ503を通じて接続され、キャッシュ
メモリモデル504は、モニタ502とCPUモデル5
01とメモリモデル506と直接接続されている。ま
た、モニタ502と図9中のそれぞれのモデルが、他の
モデルのアドレス情報へのアクセスは、「Read()
関数」又は「Write()関数」を使用して行う。ハ
ードウェアモデル507,508には、「Read()
関数」及び「Write()関数」とともに「Moni
tor_Read()関数」と「Monitor_Wr
ite()関数」が用意されている。
Further, each model in FIG.
Similar to the embodiment, it is described in the “C ++” language, and each has one “Class”. Models other than the cache memory model 504 and the monitor 502 in FIG.
The cache memory model 504 is connected through the address decoder 503, and the cache memory model 504 includes a monitor 502 and a CPU model 5.
01 and the memory model 506 are directly connected. In addition, the monitor 502 and each model in FIG. 9 can access the address information of other models by "Read ()".
Function "or" Write () function ". The hardware models 507 and 508 include “Read ()
"Function" and "Write () function" together with "Moni
tor_Read () function "and" Monitor_Wr
"ite () function" is prepared.

【0061】以下、第2実施形態のシミュレータ動作
(全体・総合的な動作検証シミュレーション)について
説明する。まず、この図5のシミュレータの基本的な動
作について説明する(図10ステップS301〜S30
3参照)。このシミュレータの基本的な動作は、第1実
施形態の説明と同様であり、ここでは要約して説明す
る。シミュレーションが実行開始後に、モニタ502に
よって、各部の初期化を行い待機状態となる。ここでモ
ニタ502に「run(restart)」などのユー
ザ指示が行われるとシミュレーション実行部を呼び出し
てシミュレーションを開始(再開)する。
The simulator operation of the second embodiment (entire / total operation verification simulation) will be described below. First, the basic operation of the simulator of FIG. 5 will be described (FIG. 10, steps S301 to S30).
3). The basic operation of this simulator is similar to that of the first embodiment, and will be summarized here. After the simulation starts to be executed, the monitor 502 initializes each unit and enters a standby state. Here, when a user instruction such as “run (restart)” is given to the monitor 502, the simulation execution unit is called to start (restart) the simulation.

【0062】このシミュレーション中のブレークポイン
トが指示されていたり、中断のユーザ指示が行われる
と、シミュレーションを一時的に中断し、再度指示待ち
状態となる。モニタ502において、「Read」や
「write」のユーザ指示があると、アドレスデコー
ダ503を通じて、この指示の「Read」や「wri
te」が、ハードウェアモデル507,508に対する
場合、その「Monitor_Write()関数」又
は「Monitor_Read()関数」を呼び出し、
これ以外の図5におけるそれぞれのモデルは、アドレス
デコーダ503を通じて又は直接、「Read()関
数」又は「Write()関数」を呼び出す。また、ユ
ーザ指示が「Read」の場合は、その結果をモニタ5
02に返送し、ユーザ指示が「end」の場合、シミュ
レーションが終了する。
When a breakpoint is designated during this simulation or a user instruction for suspension is given, the simulation is temporarily suspended and the instruction waiting state is resumed. When there is a user instruction of “Read” or “write” on the monitor 502, the “Read” or “write” of this instruction is made through the address decoder 503.
te ”is for the hardware models 507 and 508, the“ Monitor_Write () function ”or the“ Monitor_Read () function ”is called,
Other models in FIG. 5 call the “Read () function” or the “Write () function” through the address decoder 503 or directly. If the user instruction is “Read”, the result is monitored by the monitor 5.
If the user instruction is “end”, the simulation ends.

【0063】次に、上記のシミュレーション実行部の内
容について説明する(図11ステップS401〜S40
7参照)。このシミュレータの基本的な動作は、第1実
施形態の説明と同様であり、ここでは要約して説明す
る。モニタ502からシミュレーション実行部が呼び出
されると、一つのシステムクロック信号を進め、CPU
モデル501がメモリモデル506から、実行する命令
を読み込んで、この命令によるハードウェアモデル50
7又は508の実行を処理する。
Next, the contents of the above-mentioned simulation executing section will be described (FIG. 11, steps S401 to S40).
7). The basic operation of this simulator is similar to that of the first embodiment, and will be summarized here. When the simulation execution unit is called from the monitor 502, one system clock signal is advanced and the CPU
The model 501 reads an instruction to be executed from the memory model 506, and the hardware model 50 based on this instruction is read.
7 or 508 execution.

【0064】そして、実行した命令位置にブレークポイ
ントが設定されているか、又はモニタ502から終了や
中断の命令が有るかを調べる。シミュレーション実行部
は、その実行を終了してモニタ502における実行に戻
る。このとき、CPUモデル501の図示しないレジス
タ情報と、メモリモデル506の内容及びハードウェア
モデル507,508のレジスタ情報(レジスタ値)が
保持され、シミュレーション実行部が、再度システムク
ロック信号を進めて、命令を読み込み、その命令のシミ
ュレーションを順次実行する。
Then, it is checked whether a breakpoint is set at the executed instruction position or whether there is a termination or interruption instruction from the monitor 502. The simulation execution unit ends the execution and returns to the execution in the monitor 502. At this time, the register information (not shown) of the CPU model 501, the contents of the memory model 506 and the register information (register value) of the hardware models 507 and 508 are held, and the simulation executing unit advances the system clock signal again to execute the instruction. Is read and the simulation of the instruction is sequentially executed.

【0065】図6は第2実施形態のシミュレータ動作を
説明するためのブロック図である。図6において、この
シミュレータ動作例は、CPUモデル501からハード
ウェアのレジスタ情報へのアクセス状態とモニタ502
からハードウェアモデル507,508のレジスタ情報
へのアクセス状態を示している。CPUモデル501か
らメモリモデル506にアクセスする場合、アドレスデ
コーダ503を通じて、メモリモデル506の「Rea
d()関数」又は「Write()関数」を呼び出す。
FIG. 6 is a block diagram for explaining the simulator operation of the second embodiment. In FIG. 6, this simulator operation example shows an access state from the CPU model 501 to hardware register information and a monitor 502.
Show access states to the register information of the hardware models 507 and 508. When accessing the memory model 506 from the CPU model 501, the “Rea” of the memory model 506 is accessed through the address decoder 503.
Call the "d () function" or "Write () function".

【0066】この呼び出しが「Read()関数」の場
合、引数として与えられたアドレス情報(アドレス値)
を関数内でデコードして、該当するメモリモデル506
の変数を導き出し、その変数値を、引数として与えられ
た変数に代入する。一方、「Write()関数」が呼
び出された場合は、引数として与えられたアドレス情報
(アドレス値)を関数内でデコードし、該当するメモリ
モデル506の変数を導き出し、その変数に引数として
与えられた値を代入する。
When this call is the "Read () function", the address information (address value) given as an argument
Of the corresponding memory model 506
Derive the variable and assign the variable value to the variable given as an argument. On the other hand, when the "Write () function" is called, the address information (address value) given as an argument is decoded in the function, a variable of the corresponding memory model 506 is derived, and the variable is given to that variable as an argument. Substitute the value

【0067】また、CPUモデル501からメモリモデ
ル506の「Read()関数」又は「Write()
関数」にアクセスした際には、メモリモデル506によ
ってキャッシュメモリモデル504にアクセスしたこと
を示す情報も同時に通知され、キャッシュメモリモデル
504は、適宜、キャッシュ内容を変更したり、キャッ
シュヒット・ミスヒット情報を変更したり、メモリモデ
ル506にキャッシュヒット・ミスヒット情報を返送す
る。メモリモデル506から読み込みが行われた場合
は、キャッシュメモリモデル504の「Cache_R
ead()関数」が呼び出され、読み込まれたメモリモ
デル506内容が、キャッシュメモリモデル504内に
存在するかを調べる。
Further, the "Read () function" or "Write ()" of the CPU model 501 to the memory model 506 is used.
When the “function” is accessed, the information indicating that the cache memory model 504 has been accessed is also notified by the memory model 506 at the same time, and the cache memory model 504 appropriately changes the cache contents and cache hit / miss hit information. Or to return cache hit / miss hit information to the memory model 506. When data is read from the memory model 506, “Cache_R” of the cache memory model 504 is read.
The "ead () function" is called to check whether the read memory model 506 contents exist in the cache memory model 504.

【0068】このとき、アドレスデコーダは、メモリモ
デル506からキャッシュメモリモデル504にヒット
したか否かの戻り値を受け取った後に、この情報に基づ
いてCPUモデル501がメモリモデル506に読み込
まれる終了までの時間を算出する。読み込み終了までの
間では、CPUモデル501が次の命令を読み込むこと
ができないように、シミュレーション実行部に、その指
示を行う。一方、メモリモデル506に書き込みが行わ
れた場合は、キャッシュメモリモデル504の「Cac
he_Write()関数」が呼び出され、書き込まれ
たメモリアドレス情報の内容が、キャッシュメモリモデ
ル504内に存在するかを調べる。
At this time, the address decoder receives, from the memory model 506, a return value indicating whether or not the cache memory model 504 is hit, and thereafter, based on this information, the CPU model 501 is read into the memory model 506 until the end. Calculate time. Until the end of reading, the simulation model is instructed so that the CPU model 501 cannot read the next instruction. On the other hand, when data is written in the memory model 506, “Cac of the cache memory model 504 is
The "he_Write () function" is called to check whether the contents of the written memory address information exist in the cache memory model 504.

【0069】この調べでメモリアドレス情報の内容が存
在しない場合、キャッシュメモリモデル504内容を書
き替える。このとき、アドレスデコーダは、メモリモデ
ル506からキャッシュメモリモデル504にヒットし
たか否かの戻り値を受け取る。この受け取った値の情報
に基づいて、CPUモデル501がメモリモデル506
に書き込みが終了するまでの時間を算出する。この書き
込みが終了するまでの間では、CPUモデル501が次
の命令を読み込めないように、シミュレーション実行部
に、その指示を行う。
If the contents of the memory address information do not exist in this check, the contents of the cache memory model 504 are rewritten. At this time, the address decoder receives from the memory model 506 a return value indicating whether or not the cache memory model 504 is hit. Based on the information of the received value, the CPU model 501 makes the memory model 506
Calculate the time until writing is completed. Until this writing ends, the simulation execution unit is instructed so that the CPU model 501 cannot read the next instruction.

【0070】次に、モニタ502は、メモリモデル50
6にアクセスを行う場合、アドレスデコーダ503を通
じてメモリモデル506の「Monitor_Read
()関数」又は「Monitor_Write()関
数」を呼び出している。「Monitor_Rea
d()関数」が呼び出された場合は、引数として与えら
れたアドレス情報を関数内でデコードし、該当するメモ
リモデル506の変数を導き出し、この変数値を引数と
して与えられた変数に代入する。
Next, the monitor 502 is the memory model 50.
6 is accessed through the address decoder 503, “Monitor_Read” of the memory model 506.
() Function "or" Monitor_Write () function "is called. "Monitor_Rea
When the "d () function" is called, the address information given as an argument is decoded in the function, a variable of the corresponding memory model 506 is derived, and this variable value is substituted for the variable given as an argument.

【0071】「Monitor_Write()関数」
が呼び出された場合は、引数として与えられたアドレス
情報(アドレス値)を関数内でデコードし、該当するメ
モリモデル506の変数を導き出し、この変数値を引数
として与えられた変数に代入する。モニタ502からメ
モリモデル506の「Monitor_Read()関
数」及び「Monitor_Write()関数」が呼
び出された場合は、CPUモデル501から、「Rea
d()関数」と「Write()関数」が呼び出された
場合と異なり、関数が呼び出されたときにキャッシュメ
モリモデル504にアクセスすることはない。
"Monitor_Write () function"
Is called, the address information (address value) given as an argument is decoded in the function, a variable of the corresponding memory model 506 is derived, and this variable value is substituted for the variable given as an argument. When the “Monitor_Read () function” and the “Monitor_Write () function” of the memory model 506 are called from the monitor 502, the CPU model 501 displays “Rea
Unlike when the "d () function" and the "Write () function" are called, the cache memory model 504 is not accessed when the functions are called.

【0072】このように、この第2実施形態では、CP
Uモデル501からメモリモデル506へのアクセス時
にアクセス情報を通知し、キャッシュ内容を変更し、か
つ、キャッシュヒット・ミスヒット情報の変更を行い、
メモリモデル情報を返送する。また、「Read()関
数」又は「Write()関数」の呼び出時とは異なっ
てキャッシュメモリモデル504へのアクセスを実行し
ない「Monitor_Read()関数」又は「Mo
nitor_Write()関数」を呼び出している。
As described above, in the second embodiment, the CP
Access information is notified when the U model 501 accesses the memory model 506, the cache contents are changed, and the cache hit / miss hit information is changed.
Returns memory model information. Also, unlike the case where the "Read () function" or "Write () function" is called, the "Monitor_Read () function" or "Mo" that does not access the cache memory model 504 is executed.
"nitor_Write () function" is called.

【0073】この結果、この両方の関数を区分けした処
理を通じて、モニタ502からアクセスが行われた場
合、キャッシュメモリモデル504の内容が不当に変更
されるのを防止できるとともに、メモリモデル506の
情報が迅速に得られるようになって、結果的に高速かつ
確実なシミュレータ動作が可能になる。
As a result, when access is made from the monitor 502 through the processing in which both functions are divided, it is possible to prevent the contents of the cache memory model 504 from being unduly changed, and the information in the memory model 506 is It can be obtained quickly, and as a result, high-speed and reliable simulator operation becomes possible.

【0074】(第3実施形態)この第3実施形態は、前
記した第3の目的(誤った統計情報の出力阻止とキャッ
シュ情報を迅速に得る)に対応する。図7は第3実施形
態のシミュレータ構成を示すブロック図である。図7に
おいて、この第3実施形態のシミュレータは、第1実施
形態と同様機能のCPUモデル601と、モニタ602
と、アドレスデコーダ603と、キャッシュメモリモデ
ル604と、デバイスモデル部605を有している。こ
のデバイスモデル部605には、メモリモデル606及
び複数のハードウェアモデル607,608とを有して
いる。
(Third Embodiment) This third embodiment corresponds to the above-described third purpose (blocking output of erroneous statistical information and quick acquisition of cache information). FIG. 7 is a block diagram showing the simulator configuration of the third embodiment. In FIG. 7, the simulator of the third embodiment has a CPU model 601 having the same function as that of the first embodiment and a monitor 602.
An address decoder 603, a cache memory model 604, and a device model unit 605. The device model unit 605 has a memory model 606 and a plurality of hardware models 607 and 608.

【0075】モニタ602では、シミュレーション実行
時に次の処理を実行する。 (1)ファームウェアプログラム中へのブレークポイン
トの設定及び解除 (2)シミュレーションの開始、中断、終了及びステッ
プ実行 (3)ハードウェアのレジスタモデル情報と、メモリモ
デル606、キャッシュメモリモデル604及びCPU
モデル601のレジスタ情報の書き込み及び読み込み (4)CPUモデル601が実行するファームウェアプ
ログラムのアッセンブラコードの表示
The monitor 602 executes the following processing when the simulation is executed. (1) Setting and canceling a breakpoint in a firmware program (2) Start, suspension, end and step execution of simulation (3) Hardware register model information, memory model 606, cache memory model 604 and CPU
Writing and reading register information of model 601 (4) Display of assembler code of firmware program executed by CPU model 601

【0076】また、図7に示すそれぞれのモデルは、第
1実施形態と同様に「C++」言語で記述され、それぞ
れ一つの「Class」になっている。キャッシュメモ
リモデル604以外の図7に示すモデルとモニタ602
は、アドレスデコーダ603を通じて接続され、キャッ
シュメモリモデル604は、モニタ602とCPUモデ
ル601とメモリモデル606と直接接続されている。
また、モニタ602と図7に示すそれぞれのモデルは、
他のモデルのアドレス情報へのアクセスを「Rea
d()関数」又は「Write()関数」を使用して行
う。ハードウェアモデル607,608とメモリモデル
606及びキャッシュメモリモデル604には、「Re
ad()関数」又は「Write()関数」とともに
「Monitor_Read()関数」と「Monit
or_Write()関数」が用意されている。
Each model shown in FIG. 7 is described in the “C ++” language as in the first embodiment, and each model is one “Class”. A model other than the cache memory model 604 and the monitor 602 shown in FIG.
Are connected through the address decoder 603, and the cache memory model 604 is directly connected to the monitor 602, the CPU model 601, and the memory model 606.
In addition, the monitor 602 and each model shown in FIG.
For access to address information of other models, use "Rea
d () function "or" Write () function ". The hardware models 607 and 608, the memory model 606, and the cache memory model 604 include “Re
"Monitor function" and "Write () function" together with "Monitor_Read () function" and "Monitor
"or_Write () function" is prepared.

【0077】以下、第3実施形態のシミュレータ動作
(全体・総合的な動作検証シミュレーション)について
説明する。このシミュレータの基本的な動作は、第1実
施形態の説明と同様であり、ここでは要約して説明す
る。まず、この図7のシミュレータの基本的な動作につ
いて説明する(図10ステップS301〜S303参
照)。シミュレーションが実行開始されると、ハードウ
ェアモデル607,608、CPUモデル601などが
初期化されて待機状態となる。ユーザが「run(re
start)」などの指示を行うと、モニタ602によ
って、シミュレーション実行部を呼び出してシミュレー
ションを開始(再開)する。
The simulator operation of the third embodiment (entire / total operation verification simulation) will be described below. The basic operation of this simulator is similar to that of the first embodiment, and will be summarized here. First, the basic operation of the simulator in FIG. 7 will be described (see steps S301 to S303 in FIG. 10). When the simulation starts to be executed, the hardware models 607 and 608, the CPU model 601 and the like are initialized to be in a standby state. The user can run "run (re
"Start"), the monitor 602 calls the simulation execution unit to start (restart) the simulation.

【0078】このシミュレーション中に、ファームウェ
アプログラムに前記したブレークポイントが設定され、
又は、モニタ602から中断のユーザ指示があると、シ
ミュレーションを一時的に中断して指示待ち状態とな
る。モニタ602において、「Read」や「writ
e」が、ハードウェアモデル607,608に対する場
合、その「Monitor_Write()関数」又は
「Monitor_Read()関数」を呼び出し、こ
れ以外のそれぞれのモデルでは、アドレスデコーダ60
3を通じて又は直接、「Read()関数」又は「Wr
ite()関数」を呼び出す。また、ユーザ指示が「R
ead」の場合、その結果をモニタ602に返送し、
「end」の場合、シミュレーションが終了する。
During this simulation, the above-mentioned breakpoints are set in the firmware program,
Alternatively, when there is a user instruction for suspension from the monitor 602, the simulation is temporarily suspended and the instruction waiting state is entered. On the monitor 602, “Read” and “write” are displayed.
"e" is for the hardware models 607 and 608, the "Monitor_Write () function" or "Monitor_Read () function" is called, and in each of the other models, the address decoder 60 is used.
3 or directly, "Read () function" or "Wr
call the "ite () function". In addition, the user instruction is "R
In the case of “ead”, the result is returned to the monitor 602,
In the case of "end", the simulation ends.

【0079】次に、上記のシミュレーション実行部の内
容について説明する(図11ステップS401〜S40
7参照)。このシミュレータの基本的な動作は、第1実
施形態の説明と同様であり、ここでは要約して説明す
る。モニタ602からシミュレーション実行部が呼び出
されると、一つのシステムクロック信号を進め、CPU
モデル601がメモリモデル606から命令を読み込ん
で解釈した後に命令を実行する。この後に、CPUモデ
ル601から外部アクセスがあるか、又はハードウェア
モデル607,608の実行を処理するかを調べて、ハ
ードウェアモデル607又は608の実行を処理する。
Next, the contents of the simulation executing section will be described (steps S401 to S40 in FIG. 11).
7). The basic operation of this simulator is similar to that of the first embodiment, and will be summarized here. When the simulation execution unit is called from the monitor 602, one system clock signal is advanced and the CPU
The model 601 executes the instruction after reading and interpreting the instruction from the memory model 606. After that, it is checked whether there is external access from the CPU model 601 or whether the execution of the hardware model 607 or 608 is processed, and the execution of the hardware model 607 or 608 is processed.

【0080】そして、実行した命令位置にブレークポイ
ントが設定されているか、又はモニタ602から終了や
中断の命令があるかを調べる。条件によっては、シミュ
レーション実行部は、その実行を終了してモニタ602
における実行に戻る。このとき、CPUモデル601の
図示しないレジスタ情報と、メモリモデル606の内容
及びハードウェアモデル607,608のレジスタ情報
(レジスタ値)が保持される。シミュレーション実行部
が、その実行を終了しない場合、再度システムクロック
信号を進めて命令を読み込み、そのシミュレーションを
順次実行する。
Then, it is checked whether a breakpoint is set at the executed instruction position or whether there is a termination or interruption instruction from the monitor 602. Depending on the conditions, the simulation executing unit may terminate the execution and then monitor 602.
Return to execution in. At this time, the register information (not shown) of the CPU model 601, the contents of the memory model 606, and the register information (register value) of the hardware models 607 and 608 are held. When the simulation execution unit does not finish the execution, it advances the system clock signal again to read the instruction, and sequentially executes the simulation.

【0081】図8は第3実施形態のシミュレータ動作を
説明するためのブロック図である。図8において、この
シミュレータ動作は、CPUモデル601からキャッシ
ュメモリモデル604へのアクセス状態とモニタ602
からキャッシュメモリモデル604へのアクセス状態と
を示している。このシミュレータのキャッシュメモリモ
デル604は、実際のキャッシュメモリとは異なり、こ
のキャッシュメモリ内容とそのメモリアドレス情報を保
持しておらず、アドレス情報のみを保持している。この
アドレス情報が示す内容によってメモリモデル606に
直接アクセスする。すなわち、キャッシュがヒットした
場合に、このヒット情報をアドレスデコーダに返送し、
また、キャッシュがヒットしなければ、新たにキャッシ
ュメモリモデル604の情報を書き替えるのみである。
FIG. 8 is a block diagram for explaining the simulator operation of the third embodiment. In FIG. 8, this simulator operation is performed by the access state from the CPU model 601 to the cache memory model 604 and the monitor 602.
To the cache memory model 604 are shown. Unlike the actual cache memory, the cache memory model 604 of this simulator does not hold the cache memory contents and its memory address information, but only the address information. The memory model 606 is directly accessed according to the content indicated by the address information. That is, when the cache hits, this hit information is returned to the address decoder,
If the cache does not hit, the information in the cache memory model 604 is simply rewritten.

【0082】CPUモデル601からキャッシュメモリ
モデル604にアクセスを行う場合は、キャッシュメモ
リモデル604の「Read()関数」又は「Writ
e()関数」を呼び出している。この呼び出しが「Re
ad()関数」の場合、関数内で引数として与えられた
アドレス情報(アドレス値)をデコードし、キャッシュ
メモリモデル604の、いずれの部分を示しているかを
算出する。そして、キャッシュメモリモデル604がキ
ャッシュメモリモデルのいずれの部分をキャッシュして
いるかのアドレス情報(アドレス値)を、引数として与
えられた変数に代入する。
When the cache memory model 604 is accessed from the CPU model 601, the "Read () function" or the "Write" of the cache memory model 604 is used.
e () function "is called. This call is "Re
In the case of the “ad () function”, the address information (address value) given as an argument in the function is decoded, and which part of the cache memory model 604 is shown is calculated. Then, the address information (address value) indicating which part of the cache memory model is cached by the cache memory model 604 is substituted into the variable given as an argument.

【0083】一方、呼び出しが「Write()関数」
の場合、関数内で、そのアドレス情報(アドレス値)を
デコードし、キャッシュメモリモデル604の、どの部
分を示しているかを算出する。そして、引数で与えられ
た値を代入する。「Read()関数」及び「Writ
e()関数」が呼び出されたときに、キャッシュメモリ
モデル604は、キャッシュがヒットしたか否かを「C
ache_Count()関数」にも通知する。この
「Cache_Count()関数」が、キャッシュヒ
ット・ミスヒットの情報(回数)の統計情報を作成す
る。この統計情報は、モニタ602からの要求によっ
て、モニタ602に情報を通知する。
On the other hand, the call is the "Write () function".
In the case of, the address information (address value) is decoded in the function, and which part of the cache memory model 604 is shown is calculated. Then, the value given by the argument is substituted. "Read () function" and "Writ
When the "e () function" is called, the cache memory model 604 determines whether the cache is hit by "C".
The "ache_Count () function" is also notified. This "Cache_Count () function" creates statistical information of cache hit / miss hit information (number of times). This statistical information notifies the monitor 602 of the information in response to a request from the monitor 602.

【0084】一方、モニタ602からキャッシュメモリ
モデル604にアクセスを行う場合は、キャッシュメモ
リモデル604の「Monitor_Read()関
数」又は「Monitor_Write()関数」を呼
び出している。この呼び出しで、「Monitor_R
ead()関数」が呼び出されたときには、関数内で引
数として与えられたアドレス情報(アドレス値)をデコ
ードし、キャッシュメモリモデル604のどの部分を示
しているかを演算する。そして、そのキャッシュメモリ
モデル604が、このキャッシュメモリ全体のいずれの
アドレス情報をキャッシュしているかの情報(アドレス
情報)を、引数として与えられた変数に代入する。
On the other hand, when accessing the cache memory model 604 from the monitor 602, the “Monitor_Read () function” or the “Monitor_Write () function” of the cache memory model 604 is called. In this call, "Monitor_R
When the "ead () function" is called, the address information (address value) given as an argument in the function is decoded, and which part of the cache memory model 604 is shown is calculated. Then, the cache memory model 604 substitutes information (address information) indicating which address information of the entire cache memory is cached into a variable given as an argument.

【0085】また、前記した呼び出しが「Monito
r_Write()関数」の場合に、関数内で、そのア
ドレス情報(アドレス値)をデコードし、キャッシュメ
モリモデル604のどの部分を示しているかを算出す
る。そして、引数で与えられた値を代入する。このキャ
ッシュメモリモデル604内の「Monitor_Re
ad()関数」と「Monitor_Write()関
数」は、キャッシュメモリモデル604内容を変更し、
又は参照するのみであり、キャッシュヒット回数又はミ
スヒット回数の統計情報は変更しない。
In addition, the above-mentioned call is "Monito
In the case of the “r_Write () function”, the address information (address value) is decoded in the function to calculate which part of the cache memory model 604 is shown. Then, the value given by the argument is substituted. In this cache memory model 604, "Monitor_Re
The “ad () function” and the “Monitor_Write () function” change the contents of the cache memory model 604,
Alternatively, it only refers to the cache hit count or the miss hit count, and does not change the statistical information.

【0086】このように、この第3実施形態では、「R
ead()関数」又は「Write()関数」の呼び出
し時に、キャッシュメモリモデル604が、キャッシュ
ヒット・ミスヒットを「Cache_Count()関
数」に通知し、ここでキャッシュヒット回数及びキャッ
シュミスヒット回数の統計情報を作成して通知する。ま
た、モニタ602からキャッシュメモリモデル604へ
のアクセス時に、「Read()関数」又は「Writ
e()関数」の呼び出時とは異なってキャッシュの内容
変更を行わず参照のみを行い、かつ、キャッシュヒット
・ミスヒットの統計情報を変更しないための「Moni
tor_Write()関数」又は「Monitor_
Read()関数」を呼び出している。
As described above, in the third embodiment, "R
At the time of calling the "ead () function" or the "Write () function", the cache memory model 604 notifies the "Cache_Count () function" of the cache hit / miss hit, and here, the statistics of the cache hit count and the cache miss hit count. Create information and notify. When accessing the cache memory model 604 from the monitor 602, the “Read () function” or the “Write”
Unlike the case of calling the "e () function", only the reference is made without changing the cache contents, and the "Moni" for not changing the cache hit / miss hit statistical information.
"tor_Write () function" or "Monitor_
The "Read () function" is called.

【0087】この結果、この両方の関数を区分けした処
理を通じて、誤った統計情報が出力されるのを阻止でき
るとともに、キャッシュメモリモデル604にキャッシ
ュされている情報が迅速に得られるようになって、結果
的に高速かつ確実なシミュレータ動作が可能になる。
As a result, erroneous statistical information can be prevented from being output through the processing in which these two functions are divided, and the information cached in the cache memory model 604 can be quickly obtained. As a result, high-speed and reliable simulator operation becomes possible.

【0088】[0088]

【発明の効果】以上の説明から明らかなように、本発明
によれば、ハードウェアモデルへのアクセスに対する誤
動作が発生しなくなるとともに、シミュレーション実行
結果が迅速に得られるようになって、結果的に高速かつ
確実なシミュレータ動作(全体・総合的な動作検証シミ
ュレーション)が可能になるという効果を有している。
As is apparent from the above description, according to the present invention, it is possible to prevent a malfunction due to access to a hardware model and to quickly obtain a simulation execution result. This has the effect of enabling high-speed and reliable simulator operation (overall and comprehensive operation verification simulation).

【0089】また、本発明によれば、キャッシュメモリ
モデルにアクセスが行われた場合、キャッシュが不当に
変更されるのを防止できるとともに、メモリモデルの情
報が迅速に得られるようになって、結果的に高速かつ確
実なシミュレータ動作が可能になるという効果を有して
いる。
Further, according to the present invention, when the cache memory model is accessed, it is possible to prevent the cache from being changed inappropriately, and it becomes possible to quickly obtain the information of the memory model. It has the effect that the simulator operation can be performed at high speed and reliably.

【0090】さらに、本発明によれば、誤った統計情報
が出力されるのを阻止できるとともに、キャッシュメモ
リモデルにキャッシュされている情報が迅速に得られる
ようになって、結果的に高速かつ確実なシミュレータ動
作が可能になるという効果を有している。
Further, according to the present invention, it is possible to prevent incorrect statistical information from being output and to quickly obtain information cached in the cache memory model, resulting in high speed and reliability. This has the effect of enabling various simulator operations.

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

【図1】本発明の第1実施形態におけるシミュレータ構
成を示すブロック図である。
FIG. 1 is a block diagram showing a simulator configuration in a first embodiment of the present invention.

【図2】第1実施形態のシミュレータ動作を説明するた
めのブロック図である。
FIG. 2 is a block diagram for explaining a simulator operation of the first embodiment.

【図3】第1実施形態における関数について説明するた
めの図である。
FIG. 3 is a diagram for explaining a function in the first embodiment.

【図4】第1実施形態における他の関数について説明す
るための図である。
FIG. 4 is a diagram for explaining another function in the first embodiment.

【図5】第2実施形態のシミュレータ構成を示すブロッ
ク図である。
FIG. 5 is a block diagram showing a simulator configuration of a second embodiment.

【図6】第2実施形態のシミュレータ動作を説明するた
めのブロック図である。
FIG. 6 is a block diagram for explaining a simulator operation of the second embodiment.

【図7】第3実施形態のシミュレーション構成を示すブ
ロック図である。
FIG. 7 is a block diagram showing a simulation configuration of a third embodiment.

【図8】第3実施形態シミュレータ動作を説明するため
のブロック図である。
FIG. 8 is a block diagram for explaining a simulator operation according to the third embodiment.

【図9】従来のトレース型シミュレータの構成を示すブ
ロック図である。
FIG. 9 is a block diagram showing a configuration of a conventional trace type simulator.

【図10】従来のシミュレータ動作を説明するためのフ
ローチャートである。
FIG. 10 is a flowchart for explaining a conventional simulator operation.

【図11】図10中のシミュレーション実行部の処理内
容を説明するためのフローチャートである。
FIG. 11 is a flowchart for explaining processing contents of a simulation executing unit in FIG.

【図12】従来のシミュレータ動作の他の例を説明する
ためのブロック図である。
FIG. 12 is a block diagram for explaining another example of the conventional simulator operation.

【図13】従来のシミュレータにおける関数について説
明するための図である。
FIG. 13 is a diagram for explaining a function in a conventional simulator.

【図14】従来のシミュレータにおける他の関数につい
て説明するための図である。
FIG. 14 is a diagram for explaining another function in the conventional simulator.

【図15】従来のシミュレータ動作のさらに他の例を説
明するためのブロック図である。
FIG. 15 is a block diagram for explaining still another example of the conventional simulator operation.

【図16】従来のシミュレータ動作のさらに他の例を説
明するためのブロック図である。
FIG. 16 is a block diagram for explaining still another example of the conventional simulator operation.

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

101,501,601 CPUモデル 102,502,602 モニタ 103,503,603 アドレスデコーダ 104,504,604 キャッシュメモリモデル 105,505,605 デバイスモデル部 106,506,606 メモリモデル 107,108,507,508,607,608 ハ
ードウェアモデル
101, 501, 601 CPU model 102, 502, 602 Monitor 103, 503, 603 Address decoder 104, 504, 604 Cache memory model 105, 505, 605 Device model section 106, 506, 606 Memory model 107, 108, 507, 508 , 607, 608 Hardware model

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 制御系の処理をモデル化した制御系モデ
ルと、入力操作及び出力表示によるシミュレーション制
御を実行するためのモニタと、シミュレーション対象装
置におけるハードウェアをモデル化したハードウェアモ
デルとを有して動作検証シミュレーションを実行する方
法において、 前記制御系モデルからの前記ハードウェアモデルへのア
クセスによって、第1関数を呼び出すステップと、 前記モニタからの前記ハードウェアモデルへのアクセス
によって、第2関数を呼び出すステップと、 該第2関数の指示に基づいて第1関数の所定の命令を前
記ハードウェアモデルに対して実行するステップと、 を有することを特徴とする動作検証シミュレーションの
実行方法。
1. A control system model for modeling processing of a control system, a monitor for executing simulation control by input operation and output display, and a hardware model for modeling hardware in a simulation target device are provided. In the method for executing the operation verification simulation, the step of calling the first function by the access to the hardware model from the control system model, and the second function by the access to the hardware model from the monitor And a step of executing a predetermined instruction of the first function with respect to the hardware model based on an instruction of the second function.
【請求項2】 制御系の処理をモデル化した制御系モデ
ルと、入力操作及び出力表示によるシミュレーション制
御を実行するためのモニタと、シミュレーション対象装
置におけるハードウェアをモデル化したハードウェアモ
デルとを有して動作検証シミュレーションを実行する方
法において、 前記制御系モデルからの前記ハードウェアモデルへのア
クセスによって、第1関数を呼び出すステップと、 前記第1関数によって前記ハードウェアモデルに対する
起動及び終了を含む処理を行い、かつ、書き込み及び読
み込みの処理を実行するステップと、 前記モニタからの前記ハードウェアモデルへのアクセス
によって、第2関数を呼び出すステップと、 前記第2関数によって前記第1関数よりも処理数が低減
するとともに、前記ハードウェアモデルに対する起動及
び終了を含む処理を行わずに読み込み処理のみを実行す
るステップと、 を有することを特徴とする動作検証シミュレーションの
実行方法。
2. A control system model that models the processing of the control system, a monitor that executes simulation control by input operation and output display, and a hardware model that models the hardware in the simulation target device. In the method for executing a behavioral verification simulation, a step of calling a first function by accessing the hardware model from the control system model, and a process including activation and termination of the hardware model by the first function And executing a writing and reading process, calling a second function by accessing the hardware model from the monitor, and processing a number of processes by the second function more than the first function. Of the hardware How to perform operation verification simulation, characterized in that it comprises a step of executing only the starting and reading process without performing processing including termination for Le, a.
【請求項3】 制御系の処理をモデル化した制御系モデ
ルと、入力操作及び出力表示によるシミュレーション制
御を実行するためのモニタと、キャッシュメモリをモデ
ル化したキャッシュメモリモデルと、前記制御系モデル
が実行するファームウェアプログラムが格納されるとと
もにメモリをモデル化したメモリモデルと、シミュレー
ション対象装置におけるハードウェアをモデル化したハ
ードウェアモデルとを有して動作検証シミュレーション
を実行する方法において、 前記制御系モデルからの前記メモリモデルへのアクセス
によって、第1関数を呼び出すステップと、 前記第1関数によって、前記キャッシュメモリモデルへ
の書き込み及び読み込みを含む処理を実行するステップ
と、 前記モニタからの前記メモリモデルへのアクセスによっ
て、第2関数を呼び出すステップと、 前記第2関数によって、前記メモリモデルから前記キャ
ッシュメモリモデルに、アクセス情報を通知して前記キ
ャッシュメモリモデル内容を変更し、かつ、キャッシュ
ヒット・ミスヒット情報の変更を行い、さらに前記メモ
リモデル情報を返送する処理を実行するステップと、 を有することを特徴とする動作検証シミュレーションの
実行方法。
3. A control system model that models processing of a control system, a monitor for executing simulation control by input operation and output display, a cache memory model that models a cache memory, and the control system model A method for executing an operation verification simulation having a memory model in which a firmware program to be executed is stored and a memory modeled, and a hardware model in which a hardware in a simulation target device is modeled, wherein: Accessing the memory model to call a first function; executing a process including writing and reading to the cache memory model by the first function; and accessing the memory model from the monitor. By access And calling the second function, the second function notifies the cache memory model of access information to change the contents of the cache memory model, and the cache hit / miss hit information. And a step of performing a process of returning the memory model information, and a method of executing an operation verification simulation, comprising:
【請求項4】 制御系の処理をモデル化した制御系モデ
ルと、入力操作及び出力表示によるシミュレーション制
御を実行するためのモニタと、前記制御系モデルが実行
するファームウェアプログラムが格納されるとともにメ
モリをモデル化したメモリモデルと、キャッシュメモリ
をモデル化したキャッシュメモリモデルとを有して動作
検証シミュレーションを実行する方法において、 前記制御系モデルからの前記キャッシュメモリモデルへ
のアクセスによって、第1関数を呼び出すステップと、 前記第1関数によって前記キャッシュメモリモデルの内
容変更を行うとともにキャッシュヒット・ミスヒットの
統計情報を変更する処理を実行するステップと、 前記第1関数の呼び出しによって、前記キャッシュメモ
リモデルが、キャッシュヒット・ミスヒットを第3関数
に通知する処理を実行するステップと、 この第3関数によって統計情報を作成するとともに、こ
の統計情報を前記モニタからの要求によって、前記キャ
ッシュメモリモデルから通知する処理を実行するステッ
プと、 前記モニタからの前記キャッシュメモリモデルへのアク
セスによって、第2関数を呼び出すステップと、 前記第2関数により前記第1関数とは異なって統計情報
を変更しないとともに、前記キャッシュメモリモデルの
内容変更を行わずに参照のみを行う処理を実行するステ
ップと、 を有することを特徴とする動作検証シミュレーションの
実行方法。
4. A control system model modeling the processing of the control system, a monitor for executing simulation control by input operation and output display, a firmware program executed by the control system model, and a memory. A method for executing a behavioral verification simulation having a modeled memory model and a cache memory model that models a cache memory, wherein a first function is called by accessing the cache memory model from the control system model. A step of changing the contents of the cache memory model by the first function and a process of changing the statistical information of cache hit / miss hit; and a step of calling the first function, whereby the cache memory model is Cache hit A step of executing a process of notifying the third function of a mishit, and a process of creating statistical information by the third function and notifying the statistical information from the cache memory model in response to a request from the monitor And a step of calling a second function by accessing the cache memory model from the monitor, wherein statistical information is not changed by the second function unlike the first function, and the cache memory model of the cache memory model is changed. And a step of performing a process of only referring to the content without changing the content, and a method of executing an operation verification simulation, comprising:
【請求項5】 前記第1関数及び第2関数が、オブジェ
クト指向構造化プログラミング言語であることを特徴と
する請求項1又は2又は3記載の動作検証シミュレーシ
ョンの実行方法。
5. The method according to claim 1, 2, or 3, wherein the first function and the second function are object-oriented structured programming languages.
【請求項6】 前記第3関数が、オブジェクト指向構造
化プログラミング言語であることを特徴とする請求項4
記載の動作検証シミュレーションの実行方法。
6. The third function is an object-oriented structured programming language.
How to execute the described operation verification simulation.
【請求項7】 動作検証シミュレーションを実行するシ
ミュレーション実行装置において、 制御系の処理をモデル化した制御系モデル部と、入力操
作及び出力表示によるシミュレーション制御を実行する
ためのモニタ部と、シミュレーション対象装置における
ハードウェアをモデル化したハードウェアモデル部とを
有し、 前記制御系モデル部からの前記ハードウェアモデル部へ
のアクセスで呼び出した第1関数によって前記ハードウ
ェアモデル部に対する起動及び終了を含む処理を行い、
かつ、書き込み及び読み込みの処理を実行し、 前記モニタ部からの前記ハードウェアモデル部へのアク
セスで呼び出した第2関数によって前記第1関数よりも
処理数が低減するとともに、前記ハードウェアモデル部
に対する起動及び終了を含む処理を行わずに読み込み処
理のみを実行することを特徴とするシミュレーション実
行装置。
7. A simulation execution device for executing a motion verification simulation, a control system model part modeling a process of a control system, a monitor part for executing simulation control by input operation and output display, and a device to be simulated. A hardware model part that models the hardware in the above, and a process including activation and termination for the hardware model part by the first function called by the access from the control system model part to the hardware model part. And then
Moreover, the number of processes is reduced as compared to the first function by the second function called by the access to the hardware model section from the monitor section by executing the writing and reading processes, and A simulation execution device, which executes only a read process without performing a process including start-up and end.
【請求項8】 動作検証シミュレーションを実行するシ
ミュレーション実行装置において、 制御系の処理をモデル化した制御系モデル部と、入力操
作及び出力表示によるシミュレーション制御を実行する
ためのモニタ部と、キャッシュメモリモデル部と、制御
系モデル部が実行するファームウェアプログラムが格納
されるメモリモデル部と、シミュレーション対象装置に
おけるハードウェアをモデル化したハードウェアモデル
部とを有し、 前記制御系モデル部からの前記メモリモデル部へのアク
セスによって呼び出した前記第1関数によって、前記キ
ャッシュメモリモデル部への書き込み及び読み込みを含
む処理を実行し、 前記モニタ部からの前記メモリモデル部へのアクセスに
よって呼び出した前記第2関数によって、前記メモリモ
デル部から前記キャッシュメモリモデル部に、アクセス
情報を通知して前記キャッシュメモリモデル部の内容を
変更し、かつ、キャッシュヒット・ミスヒット情報の変
更を行い、さらに前記メモリモデル部の情報を返送する
処理を実行することを特徴とするシミュレーション実行
装置。
8. A simulation execution device for executing a motion verification simulation, a control system model part modeling a control system process, a monitor part for executing simulation control by input operation and output display, and a cache memory model. Unit, a memory model unit in which a firmware program executed by the control system model unit is stored, and a hardware model unit that models the hardware in the simulation target device, and the memory model from the control system model unit The first function called by accessing the memory model unit to execute processing including writing and reading to the cache memory model unit, and by the second function called by accessing the memory model unit from the monitor unit. , The memory model section From the above to the cache memory model section to notify the access information to change the contents of the cache memory model section, change the cache hit / miss hit information, and return the information of the memory model section. A simulation execution device characterized by executing.
【請求項9】 動作検証シミュレーションを実行するシ
ミュレーション実行装置において、 制御系の処理をモデル化した制御系モデル部と、入力操
作及び出力表示によるシミュレーション制御を実行する
ためのモニタ部と、制御系モデル部が実行するファーム
ウェアプログラムが格納されたメモリモデル部と、キャ
ッシュメモリをモデル化したキャッシュメモリモデル部
とを有し、 前記制御系モデル部から前記キャッシュメモリモデル部
へのアクセスで呼び出した第1関数によって前記キャッ
シュメモリモデル部の内容変更を行うとともに、キャッ
シュヒット・ミスヒットの統計情報を変更する処理を実
行し、かつ、前記キャッシュメモリモデル部が、キャッ
シュヒット・ミスヒット情報を第3関数に通知して統計
情報を作成し、この統計情報を前記モニタ部からの要求
によって通知する処理を実行し、かつ、 前記モニタ部から前記キャッシュメモリモデル部へのア
クセスで呼び出した第2関数によって、前記第1関数と
は異なり統計情報の変更を行わないとともに前記キャッ
シュメモリモデル部の内容変更を行わず参照のみを行う
処理を実行することを特徴とするシミュレーション実行
装置。
9. A simulation execution device for executing a motion verification simulation, a control system model part for modeling processing of a control system, a monitor part for executing simulation control by input operation and output display, and a control system model. A first function called by the access from the control system model unit to the cache memory model unit, the memory model unit storing a firmware program to be executed by the unit, and a cache memory model unit modeling a cache memory. Performs the processing of changing the cache hit / miss hit statistical information while changing the contents of the cache memory model portion, and the cache memory model portion notifies the third function of the cache hit / miss hit information. And create statistical information Is executed in response to a request from the monitor unit, and the second function called by the monitor unit to access the cache memory model unit changes statistical information unlike the first function. A simulation executing device, characterized in that it executes a process of referring only without changing the contents of the cache memory model part.
【請求項10】 制御系モデルからのハードウェアモデ
ルへのアクセスによって呼び出した第1関数によってハ
ードウェアモデルに対する起動及び終了を含む処理を行
い、かつ、書き込み及び読み込みの処理を実行する制御
と、 モニタからのハードウェアモデルへのアクセスによって
呼び出した第2関数によって第1関数よりも処理数が低
減するとともにハードウェアモデルを起動及び終了を含
む処理を行わずに読み込み処理のみを実行する制御と、 を実質的なコンピュータが実行するためのプログラム。
10. A control for executing processing including start and end for the hardware model by a first function called by access to the hardware model from the control system model, and executing writing and reading processing, and a monitor. The second function called by accessing the hardware model from the above reduces the number of processes as compared with the first function, and controls to execute only the reading process without performing processes including starting and ending of the hardware model. A program that is essentially executed by a computer.
【請求項11】 制御系モデルからのメモリモデルへの
アクセスによって呼び出した第1関数によって、キャッ
シュメモリモデルへの書き込み及び読み込みを含む処理
を実行する制御と、 モニタからのメモリモデルへのアクセスで呼び出した第
2関数によって、メモリモデルからキャッシュメモリモ
デルに、アクセス情報を通知してキャッシュメモリモデ
ル内容を変更し、かつ、キャッシュヒット・ミスヒット
情報の変更を行い、さらにメモリモデル情報を返送する
処理を実行する制御と、 を実質的なコンピュータが実行するためのプログラム。
11. A control for executing a process including writing and reading to and from a cache memory model by a first function called by an access to a memory model from a control system model, and a call to access the memory model from a monitor. The second function is to notify the access information from the memory model to the cache memory model, change the contents of the cache memory model, change the cache hit / miss hit information, and return the memory model information. A control that is executed and a program that is executed by a substantial computer.
【請求項12】 制御系モデルからのキャッシュメモリ
モデルへのアクセスによって呼び出した第1関数によっ
てキャッシュメモリモデルの内容変更を行うとともに、
キャッシュヒット・ミスヒットの統計情報を変更する処
理を実行する制御と、 第1関数の呼び出しによって、キャッシュメモリモデル
が、キャッシュヒット・ミスヒットを第3関数に通知す
る処理を実行する制御と、 第3関数によって統計情報を作成するとともに、この統
計情報をモニタからの要求によってキャッシュメモリモ
デルから通知する処理を実行する制御と、 モニタからのキャッシュメモリモデルへのアクセスによ
って呼び出した第2関数によって第1関数とは異なり統
計情報を変更しないとともにキャッシュメモリモデルの
内容変更を行わずに参照のみを行う処理を実行する制御
と、 を実質的なコンピュータが実行するためのプログラム。
12. The contents of the cache memory model are changed by the first function called by accessing the cache memory model from the control system model,
Control for executing processing for changing statistical information of cache hit / miss hit; control for causing the cache memory model to notify processing of cache hit / miss hit to the third function by calling the first function; The statistical information is created by the three functions, and the first function is executed by the control that executes the process of notifying the statistical information from the cache memory model by the request from the monitor and the second function called by the access to the cache memory model from the monitor. Unlike a function, it is a program that causes a computer to execute the control that executes the processing that does not change the statistical information and does not change the contents of the cache memory model, and only performs the reference.
JP2002055108A 2002-02-28 2002-02-28 Method and device for executing operation verification simulation, and its program Pending JP2003256239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002055108A JP2003256239A (en) 2002-02-28 2002-02-28 Method and device for executing operation verification simulation, and its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002055108A JP2003256239A (en) 2002-02-28 2002-02-28 Method and device for executing operation verification simulation, and its program

Publications (1)

Publication Number Publication Date
JP2003256239A true JP2003256239A (en) 2003-09-10

Family

ID=28666029

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002055108A Pending JP2003256239A (en) 2002-02-28 2002-02-28 Method and device for executing operation verification simulation, and its program

Country Status (1)

Country Link
JP (1) JP2003256239A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011204275A (en) * 2006-03-29 2011-10-13 Hitachi Ltd Method and apparatus for simulating microcomputer-based system
US11321131B2 (en) 2019-03-25 2022-05-03 Kabushiki Kaisha Toshiba Evaluation device and storage medium storing evaluation program for system LSI

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011204275A (en) * 2006-03-29 2011-10-13 Hitachi Ltd Method and apparatus for simulating microcomputer-based system
US8700379B2 (en) 2006-03-29 2014-04-15 Hitachi, Ltd Method and apparatus for simulating microcomputer-based systems
US11321131B2 (en) 2019-03-25 2022-05-03 Kabushiki Kaisha Toshiba Evaluation device and storage medium storing evaluation program for system LSI

Similar Documents

Publication Publication Date Title
US7797580B2 (en) Determining that a routine has stalled
US8484006B2 (en) Method for dynamically adjusting speed versus accuracy of computer platform simulation
US8793115B2 (en) Interface converter for unified view of multiple computer system simulations
US5896536A (en) Data triggered trace support for debugging object oriented programs
US20080208555A1 (en) Simulation method and simulation apparatus
JP5270330B2 (en) Multicore microcomputer system simulation method and simulation apparatus
KR102025078B1 (en) Diagnosing code using single step execution
JP2007122602A (en) Multi-core model simulation program, recording medium recording the program, multi-core model simulator, and multi-core model simulation method
JP2010160704A (en) Debug support device
US7895027B2 (en) HDL re-simulation from checkpoints
EP1220099A2 (en) Debugger system, method of extending debug functions of a debugger system and debugger program product
US20010027387A1 (en) Debugging supporting apparatus, debugging supporting method and recording medium readable by computer with its programs recorded thereon
JP5542643B2 (en) Simulation apparatus and simulation program
US11544436B1 (en) Hardware-software interaction testing using formal verification
JP2003256239A (en) Method and device for executing operation verification simulation, and its program
US20060129744A1 (en) Method and apparatus for enabling non-volatile content filtering
US9417987B2 (en) Advisory warning and workaround indications to user when stopped between load and store conditional instructions while using source level debuggers
JP2006172234A (en) System performance evaluation method and system performance evaluation device
JP2007052783A (en) Simulation of data processor
JP2005353020A (en) Simulation system for computer program
US8042176B2 (en) Computer readable medium on which is stored a program for preventing the unauthorized use of program data
US20070265821A1 (en) Simulation apparatus, simulation method, and computer-readable recording medium storing simulation program
WO2006093762A1 (en) Computer platform simulation
JP2011203803A (en) Debugging support device and program for debugging support
JP2661447B2 (en) I / O device test method