JPH07160537A - Simulator - Google Patents

Simulator

Info

Publication number
JPH07160537A
JPH07160537A JP5304136A JP30413693A JPH07160537A JP H07160537 A JPH07160537 A JP H07160537A JP 5304136 A JP5304136 A JP 5304136A JP 30413693 A JP30413693 A JP 30413693A JP H07160537 A JPH07160537 A JP H07160537A
Authority
JP
Japan
Prior art keywords
cpu
elapsed time
peripheral
unit
simulation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5304136A
Other languages
Japanese (ja)
Inventor
Kenji Ito
謙次 伊藤
Hirohiko Tanaka
裕彦 田中
Yoshio Nakano
善夫 中埜
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5304136A priority Critical patent/JPH07160537A/en
Publication of JPH07160537A publication Critical patent/JPH07160537A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To provide the simulator, for which synchronism can be provided only when it is required and processing speed can be accelerated, concerning the simulator for which a CPU simulation part and a peripheral function simulation part parallelly execute the simulation. CONSTITUTION:The simulator is provided with a CPU simulation part 11, peirpheral function simulation part 14, history information managing part 13 for managing the lapse of time at a CPU just before the start of a state change and an internal state while making them correspondent each other each time the internal state of the CPU simulation part 11 is changed, input/output managing part 18 for calculating the lapse of time at the CPU at the time of performing interruption when the interruption is requested from the peripheral function simulation part 14 to the CPU simulation part 11 and for outputting the calculated result to a state recovery part, and state recovery part 16 for recovering the state of the CPU simulation part 11 so as to enable the interruption by referring to the stored contents in the history information managing part 13 based on CPU passed time T when this time T at the time of performing the interruption is inputted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はCPUの命令実行シミュ
レーションと周辺装置の機能シミュレーションを同期を
取りつつ並列処理するシミュレータに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a simulator for performing parallel processing of CPU instruction execution simulation and peripheral device functional simulation in synchronization with each other.

【0002】[0002]

【従来の技術】シミュレータは、開発されたプログラム
の命令実行が、実際の計算機上でどのように処理されて
いくかを模擬的に実行するものである。シミュレータに
は、CPUの命令実行シミュレーションを行なうCPU
シミュレーション部と周辺装置の機能シミュレーション
のを行なう周辺機能シミュレーション部が同期を取りつ
つ実行するものがある。
2. Description of the Related Art A simulator simulates how an instruction of a developed program is processed on an actual computer. The simulator is a CPU that simulates the instruction execution of the CPU.
There is one in which a simulation unit and a peripheral function simulation unit, which performs a functional simulation of peripheral devices, execute in synchronization with each other.

【0003】具体的には、CPUシミュレーション部が
1ステップだけ命令実行シミュレーションを実行して、
1ステップだけ命令実行シミュレーションを終了した時
点で中断し、CPUシミュレーション部が中断した状態
で、周辺機能シミュレーション部がCPUシミュレーシ
ョン部の1ステップに相当する時間の周辺機能シミュレ
ーションを実行して、処理を中断する。周辺機能シミュ
レーション部が中断後、CPUシミュレーション部は1
ステップだけ命令実行シミュレーションを実行して中断
するという手順を繰り返すというものである。(特開昭
64−76236) また、他のシミュレータとして、CPUシミュレーショ
ン部と周辺機能シミュレーション部とが並列して処理を
進行しつつ、同期を行なうものがある。
Specifically, the CPU simulation section executes an instruction execution simulation for only one step,
When the instruction execution simulation is finished for only one step, it is interrupted, and in the state where the CPU simulation section is interrupted, the peripheral function simulation section executes the peripheral function simulation for a time corresponding to one step of the CPU simulation section and interrupts the processing. To do. After the peripheral function simulation unit is interrupted, the CPU simulation unit is set to 1
This is to repeat the procedure of executing the instruction execution simulation for only steps and interrupting it. (Japanese Patent Application Laid-Open No. 64-76236) Further, as another simulator, there is one in which a CPU simulation unit and a peripheral function simulation unit perform processing in parallel while performing processing.

【0004】具体的には、シミュレーション上での経過
時間が一定間隔となるようにステップを定め、ステップ
ごとに各々のシミュレーション部が同時に処理を開始
し、全てのシミュレーション部の処理が終了したら次の
ステップに進むというものである。(特開平3−157
779)
Specifically, steps are set so that the elapsed time on the simulation is at a constant interval, and each simulation unit starts processing at the same time for each step. It is to proceed to the step. (JP-A-3-157
779)

【0005】[0005]

【発明が解決しようとする課題】ところが、上記した従
来のシミュレータでは、以下のような問題が生じる。特
開昭64−76236のシミュレータでは、CPUシミ
ュレーション部もしくは周辺機能シミュレーション部の
どちらか一方は常に中断状態であり全体の処理速度が遅
いという問題があった。
However, the conventional simulator described above has the following problems. In the simulator of Japanese Patent Laid-Open No. 64-76236, there is a problem that either the CPU simulation unit or the peripheral function simulation unit is always in a suspended state and the overall processing speed is slow.

【0006】特開平3−157779では、各シミュレ
ーション部のシミュレーションにかかる時間はまちまち
であり、先に処理が終了したシミュレーション部は、同
期の必要の有無にかかわらず、全てのシミュレーション
部の処理が終了するまでは、次のステップに進むことは
できず待機していなければならなかった。たとえば、指
定されたデータを画面上に出力し、もしT秒以内にボタ
ンが押されたならば、CPUに対して割り込み信号を発
生する周辺機能の動作をシミュレーションする場合を考
える。
According to Japanese Patent Laid-Open No. 3-157779, the time required for the simulation of each simulation section varies, and the simulation section that has completed the processing ends the processing of all the simulation sections regardless of the necessity of synchronization. Until then, I had to wait because I could not proceed to the next step. For example, consider a case in which specified data is output on the screen, and if the button is pressed within T seconds, the operation of a peripheral function that generates an interrupt signal to the CPU is simulated.

【0007】CPUシミュレーション部の方が周辺機能
シミュレーション部より短時間でシミュレーションする
場合、この方法ではCPUシミュレーション部は自分の
処理の終了後は、周辺機能シミュレーション部の処理が
終了するまで、待機しなければならない。しかし、周辺
機能ユニットから割込み信号が発生した時だけ同期をと
ればよいはずなので、割込み信号が発生しなかった場
合、CPUシミュレーション部は無駄に待機することに
なる。
When the CPU simulation unit simulates in a shorter time than the peripheral function simulation unit, in this method, the CPU simulation unit must wait after the processing of its own is completed until the processing of the peripheral function simulation unit is completed. I have to. However, since it suffices to establish synchronization only when the interrupt signal is generated from the peripheral function unit, if the interrupt signal is not generated, the CPU simulation unit will wait unnecessarily.

【0008】このように、無駄な待機をすることによ
り、シミュレータ全体の処理速度が遅くなるという問題
があった。本発明は上記の従来の問題点を解決し、CP
Uシミュレーション部と周辺機能シミュレーション部
が、並列にシミュレーションを実行するシミュレータに
おいて必要な時だけ同期を実現することができ、処理速
度が高速なシミュレータを提供することを目的とする。
Thus, there is a problem that the processing speed of the simulator as a whole becomes slow due to the unnecessary waiting. The present invention solves the above-mentioned conventional problems, and
An object of the present invention is to provide a simulator in which the U simulation unit and the peripheral function simulation unit can realize synchronization only when necessary in a simulator that executes simulations in parallel, and the processing speed is high.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、CPUの命令実行をシミュ
レーションを行なうCPUシミュレーション部と、CP
Uの周辺装置のシミュレーションを行なう周辺機能シミ
ュレーション部と、前記CPUシミュレーション部でシ
ミュレーションした命令を実機上で処理した場合に要す
る時間の累計であるCPU経過時間を格納するCPU経
過時間管理部と、前記CPUシミュレーション部の内部
状態が変化するごとに状態変化が始まる直前の時点のC
PU経過時間を、前記CPU経過時間管理部から取りだ
し、前記CPUシミュレーション部の内部状態と対応づ
けて履歴情報として管理する履歴情報管理部と、前記周
辺機能シミュレーション部でシミュレーションした処理
を実機上で処理した場合に要する時間の累計である周辺
機能経過時間を格納する周辺機能経過時間管理部と、前
記CPUシミュレーション部から、前記周辺機能シミュ
レーション部に対して処理要求があった場合、前記CP
U経過時間管理部からCPU経過時間を取りだし、前記
周辺機能経過時間管理部から周辺機能経過時間を取りだ
し、前記CPU経過時間と前記周辺機能経過時間を対応
づけて後述する周辺処理情報格納部に出力し、前記周辺
機能シミュレーション部から、前記CPUシミュレーシ
ョン部に割込み要求があった場合、前記周辺機能経過時
間管理部から割り込みが発生した時点の周辺機能経過時
間を取り出し、この割り込みが発生する基となった処理
要求が発生した時点のCPU経過時間と周辺機能経過時
間とを取りだし、取り出されたそれぞれの経過時間を項
とする演算により、CPUシミュレーション部がどの時
点にもどって割り込みを行なうのか、割り込みを行う時
点のCPU経過時間を算出し、前記状態復元部に対して
算出された割り込みを行う時点のCPU経過時間出力す
る入出力管理部と、前記入出力管理部より出力された処
理要求が発生した時点のCPU経過時間と周辺機能経過
時間とを対応づけた周辺処理情報を格納する周辺処理情
報格納部と、前記入出力管理部により出力された割り込
みを行なう時点のCPU経過時間Tが入力されると、前
記履歴情報管理部の格納内容を参照し、格納されている
履歴情報のうちCPU経過時間が入力されたCPU経過
時間Tに等しい、あるいは入力されたCPU経過時間T
より大きくかつ入力されたCPU経過時間Tに最も近い
という条件をみたす履歴情報Hを前記履歴情報管理部か
ら検索し、前記CPUシミュレーション部を前記履歴情
報Hの内部状態と同じ状態にし、前記CPU経過時間管
理部に格納されているCPU経過時間を入力されたCP
U経過時間Tに更新する状態復元部と、を備えることを
特徴とする。
In order to achieve the above object, the invention according to claim 1 is a CPU simulation section for simulating instruction execution of a CPU, and a CP.
A peripheral function simulation unit for simulating U peripheral devices; a CPU elapsed time management unit for storing CPU elapsed time, which is the cumulative time required to process instructions simulated by the CPU simulation unit on an actual machine; Every time the internal state of the CPU simulation section changes, C immediately before the state change starts
A history information management unit that retrieves the PU elapsed time from the CPU elapsed time management unit and manages it as history information in association with the internal state of the CPU simulation unit, and the process simulated by the peripheral function simulation unit is processed on an actual machine. When there is a processing request from the peripheral function elapsed time management unit that stores the peripheral function elapsed time that is the total time required for the peripheral function simulation unit and the CPU simulation unit, the CP
The CPU elapsed time is retrieved from the U elapsed time management unit, the peripheral function elapsed time is retrieved from the peripheral function elapsed time management unit, and the CPU elapsed time and the peripheral function elapsed time are associated and output to the peripheral processing information storage unit described later. However, when the peripheral function simulation unit makes an interrupt request to the CPU simulation unit, the peripheral function elapsed time at the time when the interrupt is generated is taken out from the peripheral function elapsed time management unit, and becomes the basis for generating this interrupt. The CPU elapsed time and the peripheral function elapsed time at the time when the processing request is generated are taken out, and the CPU simulation unit returns an interrupt at which point the interrupt is made by the operation with each elapsed time taken as a term. The CPU elapsed time at the time of execution is calculated, and the interrupt calculated for the state restoration unit And an input / output management unit that outputs the CPU elapsed time at the time of performing the operation, and peripheral processing information that associates the CPU elapsed time and the peripheral function elapsed time when the processing request output from the input / output management unit occurs. When the peripheral processing information storage unit and the CPU elapsed time T at the time of the interruption output by the input / output management unit are input, the stored contents of the history information management unit are referred to and the stored history information is stored. Of these, the CPU elapsed time is equal to the input CPU elapsed time T, or the input CPU elapsed time T
The history information H satisfying the condition that it is larger and closest to the input CPU elapsed time T is searched from the history information management unit, and the CPU simulation unit is set to the same state as the internal state of the history information H. CP with the CPU elapsed time stored in the time management unit input
And a state restoration unit that updates to the U elapsed time T.

【0010】請求項2記載の発明は、請求項1記載のシ
ミュレータにおいて、上記周辺機能シミュレーション部
が複数存在し、各周辺機能シミュレーション部はそれぞ
れ異なる識別子を有しており、各周辺機能シミュレーシ
ョン部に対応して、上記周辺機能経過時間管理部が存在
し、上記周辺処理情報格納部は、周辺処理情報として、
さらに、周辺処理情報に関係する周辺機能シミュレーシ
ョン部の識別子と、割り込み処理を行なう時点のCPU
経過時間とを格納し、上記入出力制御部が、周辺処理情
報出力の際に処理要求を受けた周辺機能シミュレーショ
ン部の識別子も出力し、さらに、算出された割り込みを
行なう時点のCPU経過時間を、算出の際にとり出した
周辺処理情報と対応付けて周辺処理情報格納部に出力
し、さらに、必要に応じて周辺処理情報の削除を行う周
辺処理情報管理部と、CPUシミュレーション部のシミ
ュレーションにおいて、正しい順序で、割り込み処理が
行なわれるように、一度行なった割り込み処理をCPU
シミュレーション部に再度行なわせる割り込み再要求制
御部と、を有することを特徴とする。
According to a second aspect of the present invention, in the simulator according to the first aspect, there are a plurality of the peripheral function simulation units, each peripheral function simulation unit has a different identifier, and each peripheral function simulation unit has a different identifier. Correspondingly, the peripheral function elapsed time management unit exists, and the peripheral processing information storage unit stores the peripheral processing information as
Further, the identifier of the peripheral function simulation section related to the peripheral processing information and the CPU at the time of performing the interrupt processing.
The elapsed time is stored, the input / output control unit also outputs the identifier of the peripheral function simulation unit that has received the processing request at the time of outputting the peripheral processing information, and further the CPU elapsed time at the time of performing the calculated interrupt. In the simulation of the peripheral processing information management unit that outputs to the peripheral processing information storage unit in association with the peripheral processing information extracted at the time of calculation, and deletes the peripheral processing information as necessary, and the simulation of the CPU simulation unit, The interrupt processing performed once is executed by the CPU so that the interrupt processing is performed in the correct order.
And an interrupt re-request control unit that causes the simulation unit to perform the request again.

【0011】請求項3の発明は、請求項2記載の発明に
おいて、上記周辺処理情報管理部は、周辺機能シミュレ
ーション部のシミュレーションが終了した際に、周辺処
理情報格納部の格納内容を参照し、シミュレーションが
終了した周辺機能シミュレーション部と同じ識別子が格
納されている周辺処理情報を検索し、当該周辺処理情報
に入出力管理部によって算出された割り込み処理を行な
う時点のCPU経過時間が格納されていないとき当該周
辺処理情報の削除を行い、また、入出力管理部によって
割り込み要求を行なう時点のCPU経過時間が算出され
た際に、周辺処理情報格納部の格納内容を参照し、算出
されたCPU経過時間より後にだされた処理要求に関す
る周辺処理情報がある場合は、この周辺処理情報を削除
し、また、周辺処理情報格納部の格納内容を参照し、最
も古い割り込み処理を行なう時点のCPU経過時間Tを
検索し、当該CPU経過時間TがCPU経過時間管理部
に管理されている最も新しいCPU経過時間よりも古
く、かつ上記CPU経過時間Tが格納さえれている周辺
処理情報以外の周辺処理情報を参照した場合、処理要求
が行なわれた時点のCPU経過時間が前記CPU経過時
間Tより古く、かつ、割り込みを処理を行なう時点のC
PU経過時間の値が格納されていない周辺処理情報が存
在しない場合、上記CPU経過時間Tを含む周辺処理情
報を削除し、上記、割り込み再発生制御部は、周辺処理
情報格納部の格納内容を参照し、割り込み処理を行なう
時点のCPU経過時間が現在のCPU経過時間管理部に
管理されているCPU経過時間と等しい周辺処理情報が
あるかどうか検索し、有る場合は、CPUシミュレーシ
ョン部が再度割り込み処理を行なわせることを特徴とす
る。
According to a third aspect of the invention, in the invention according to the second aspect, the peripheral processing information management section refers to the contents stored in the peripheral processing information storage section when the simulation of the peripheral function simulation section is completed, The peripheral processing information storing the same identifier as that of the peripheral function simulation unit for which the simulation is completed is searched, and the CPU elapsed time at the time of performing the interrupt processing calculated by the input / output management unit is not stored in the peripheral processing information. At this time, when the peripheral processing information is deleted, and when the CPU elapsed time at the time of issuing an interrupt request by the input / output management unit is calculated, the stored contents of the peripheral processing information storage unit are referred to If there is peripheral processing information related to a processing request issued after the time, this peripheral processing information is deleted, and the peripheral processing information is deleted. The CPU elapsed time T at the time of performing the oldest interrupt process is searched by referring to the stored contents of the information storage unit, and the CPU elapsed time T becomes older than the newest CPU elapsed time managed by the CPU elapsed time management unit. Further, when the peripheral processing information other than the peripheral processing information in which the CPU elapsed time T is stored is referred to, the CPU elapsed time at the time when the processing request is made is older than the CPU elapsed time T, and the interrupt is generated. C at the time of processing
When there is no peripheral processing information in which the value of the PU elapsed time is stored, the peripheral processing information including the CPU elapsed time T is deleted, and the interrupt reoccurrence control unit stores the contents stored in the peripheral processing information storage unit. The CPU simulation unit refers again to search whether there is peripheral processing information in which the CPU elapsed time at the time of performing the interrupt processing is equal to the CPU elapsed time managed by the current CPU elapsed time management unit. The feature is that processing is performed.

【0012】請求項4の発明は、請求項1記載の発明に
おいて、履歴情報管理部は、前記CPUシミュレーショ
ン部から前記周辺機能シミュレーション部に対して処理
要求が発生した直後から前記周辺機能シミュレーション
部から前記CPUシミュレーション部に対して割込み要
求が発生するまでの間だけ動作することを特徴とする。
According to a fourth aspect of the present invention, in the first aspect of the present invention, the history information management section is provided with the peripheral function simulation section immediately after the CPU simulation section issues a processing request to the peripheral function simulation section. It is characterized in that it operates only until an interrupt request is issued to the CPU simulation section.

【0013】請求項5の発明は、請求項2記載の発明に
おいて、履歴情報管理部は前記周辺処理情報格納部に前
記周辺処理情報が1個以上格納されている間だけ動作す
ることを特徴とする。請求項6の発明は、請求項1、2
記載の発明において、上記状態復元部が、前記CPU
シミュレーション部に割込み要求があった場合、前記履
歴情報管理部に格納されている履歴情報のうち内部状態
が割込み許可状態であり、且つCPU経過時間が前記経
過時間Tに等しいあるいは前記経過時間Tより大きくか
つ前記経過時間Tに最も近いという条件をみたす履歴情
報Hを前記履歴情報管理部から検索し前記CPUシミュ
レーション部を前記履歴情報Hの内部状態と同じ状態に
し、前記CPU経過時間管理部に格納されているCPU
経過時間を前記経過時間Tに更新することを特徴とす
る。
According to a fifth aspect of the invention, in the second aspect of the invention, the history information management unit operates only while one or more pieces of the peripheral processing information are stored in the peripheral processing information storage unit. To do. The invention of claim 6 relates to claims 1 and 2.
In the invention described above, the state restoration unit is the CPU.
When the simulation unit receives an interrupt request, the internal state of the history information stored in the history information management unit is the interrupt enabled state, and the CPU elapsed time is equal to the elapsed time T or from the elapsed time T. The history information H satisfying the condition that it is large and closest to the elapsed time T is retrieved from the history information management unit, and the CPU simulation unit is set to the same state as the internal state of the history information H and stored in the CPU elapsed time management unit. CPU
The elapsed time is updated to the elapsed time T.

【0014】[0014]

【作用】上記構成のシミュレータは、以下のように作用
する。請求項1の発明では、CPUシミュレーション部
は、CPUの命令実行をシミュレーションを行なう。周
辺機能シミュレーション部は、CPUの周辺装置のシミ
ュレーションを行なう。
The simulator having the above-described structure operates as follows. According to the first aspect of the invention, the CPU simulation unit simulates the instruction execution of the CPU. The peripheral function simulation section simulates a peripheral device of the CPU.

【0015】CPU経過時間管理部は、前記CPUシミ
ュレーション部でシミュレーションした命令を実機上で
処理した場合に要する時間の累計であるCPU経過時間
を格納する。履歴情報管理部は、前記CPUシミュレー
ション部の内部状態が変化するごとに状態変化が始まる
直前の時点のCPU経過時間を、前記CPU経過時間管
理部から取りだし、前記CPUシミュレーション部の内
部状態と対応づけて履歴情報として管理する周辺機能経
過時間管理部は、前記周辺機能シミュレーション部でシ
ミュレーションした処理を実機上で処理した場合に要す
る時間の累計である周辺機能経過時間を格納する。
The CPU elapsed time management unit stores the CPU elapsed time, which is the total time required to process the instructions simulated by the CPU simulation unit on the actual machine. The history information management unit retrieves from the CPU elapsed time management unit the CPU elapsed time immediately before the state change starts each time the internal state of the CPU simulation unit changes, and associates the CPU elapsed time with the internal state of the CPU simulation unit. The peripheral function elapsed time management unit which manages the history information as history information stores the peripheral function elapsed time which is the total time required when the processing simulated by the peripheral function simulation unit is processed on an actual machine.

【0016】入出力管理部は、前記CPUシミュレーシ
ョン部から、前記周辺機能シミュレーション部に対して
処理要求があった場合、前記CPU経過時間管理部から
CPU経過時間を取りだし、前記周辺機能経過時間管理
部から周辺機能経過時間を取りだし、前記CPU経過時
間と前記周辺機能経過時間を対応づけて後述する周辺処
理情報格納部に出力し、前記周辺機能シミュレーション
部から、前記CPUシミュレーション部に割込み要求が
あった場合、前記周辺機能経過時間管理部から割り込み
が発生した時点の周辺機能経過時間を取り出し、この割
り込みが発生する基となった処理要求が発生した時点の
CPU経過時間と周辺機能経過時間とを取りだし、取り
出されたそれぞれの経過時間を項とする演算により、C
PUシミュレーション部がどの時点にもどって割り込み
を行なうのか、割り込みを行う時点のCPU経過時間を
算出し、前記状態復元部に対して算出された割り込みを
行う時点のCPU経過時間出力する。
The input / output management unit retrieves the CPU elapsed time from the CPU elapsed time management unit when the CPU simulation unit issues a processing request to the peripheral function simulation unit, and the peripheral function elapsed time management unit. Then, the peripheral function elapsed time is extracted from the CPU, and the CPU elapsed time and the peripheral function elapsed time are associated with each other and output to the peripheral processing information storage unit described later. From the peripheral function simulation unit, there is an interrupt request to the CPU simulation unit. In this case, the peripheral function elapsed time is taken out from the peripheral function elapsed time management unit, and the CPU elapsed time and the peripheral function elapsed time at the time when the processing request which is the basis of the interrupt is generated. , C is calculated by the calculation with each elapsed time taken out as a term.
The CPU elapsed time at the time when the PU simulation unit makes an interrupt is calculated, and the CPU elapsed time at the time of the interrupt is calculated, and the CPU elapsed time at the time when the calculated interrupt is executed is output to the state restoration unit.

【0017】周辺処理情報格納部は、前記入出力管理部
より出力された処理要求が発生した時点のCPU経過時
間と周辺機能経過時間とを対応づけた周辺処理情報を格
納する。状態復元部は、前記入出力管理部により出力さ
れた割り込みを行なう時点のCPU経過時間Tが入力さ
れると、前記履歴情報管理部の格納内容を参照し、格納
されている履歴情報のうちCPU経過時間が入力された
CPU経過時間Tに等しい、あるいは入力されたCPU
経過時間Tより大きくかつ入力されたCPU経過時間T
に最も近いという条件をみたす履歴情報Hを前記履歴情
報管理部から検索し、前記CPUシミュレーション部を
前記履歴情報Hの内部状態と同じ状態にし、前記CPU
経過時間管理部に格納されているCPU経過時間を入力
されたCPU経過時間Tに更新する。
The peripheral processing information storage unit stores the peripheral processing information in which the CPU elapsed time and the peripheral function elapsed time at the time of the processing request output from the input / output management unit are associated with each other. When the CPU elapsed time T at the time of making an interrupt output from the input / output management unit is input, the state restoration unit refers to the stored contents of the history information management unit, and selects the CPU among the stored history information. CPU whose elapsed time is equal to the input CPU or elapsed time T
CPU elapsed time T that is larger than the elapsed time T and is input
Is searched for from the history information management unit, and the CPU simulation unit is set to the same state as the internal state of the history information H.
The CPU elapsed time stored in the elapsed time management unit is updated to the input CPU elapsed time T.

【0018】請求項2の発明は、請求項1記載のシミュ
レータにおいて、上記周辺機能シミュレーション部が複
数存在し、各周辺機能シミュレーション部はそれぞれ異
なる識別子を有する。各周辺機能シミュレーション部に
対応して、上記周辺機能経過時間管理部が存在する。
According to a second aspect of the present invention, in the simulator according to the first aspect, there are a plurality of peripheral function simulation units, and each peripheral function simulation unit has a different identifier. The peripheral function elapsed time management unit exists corresponding to each peripheral function simulation unit.

【0019】上記周辺処理情報格納部は、周辺処理情報
として、さらに、周辺処理情報に関係する周辺機能シミ
ュレーション部の識別子と、割り込み処理を行なう時点
のCPU経過時間とを格納する。上記入出力制御部は、
周辺処理情報出力の際に処理要求を受けた周辺機能シミ
ュレーション部の識別子も出力し、さらに、算出された
割り込みを行なう時点のCPU経過時間を、算出の際に
とり出した周辺処理情報と対応付けて周辺処理情報格納
部に出力する。
The peripheral processing information storage section further stores, as the peripheral processing information, the identifier of the peripheral function simulation section related to the peripheral processing information and the CPU elapsed time at the time of performing the interrupt processing. The input / output control unit is
When outputting the peripheral processing information, the identifier of the peripheral function simulation unit that received the processing request is also output, and the CPU elapsed time at the time of performing the calculated interrupt is associated with the peripheral processing information extracted during the calculation. Output to the peripheral processing information storage unit.

【0020】さらに、周辺処理情報管理部と割り込み再
要求制御部とを有し、周辺処理情報管理部は、必要に応
じて周辺処理情報の削除を行い、割り込み再要求制御部
は、CPUシミュレーション部のシミュレーションにお
いて、正しい順序で、割り込み処理が行なわれるよう
に、一度行なった割り込み処理をCPUシミュレーショ
ン部に再度行なわせる。
Further, it has a peripheral processing information management section and an interrupt re-request control section, the peripheral processing information management section deletes the peripheral processing information as necessary, and the interrupt re-request control section is a CPU simulation section. In the simulation of 1, the CPU simulation unit is made to perform the interrupt processing once performed so that the interrupt processing is performed in the correct order.

【0021】請求項3の発明では、請求項2記載のシミ
ュレータにおいて、上記周辺処理情報管理部が、周辺機
能シミュレーション部のシミュレーションが終了した際
に、周辺処理情報格納部の格納内容を参照し、シミュレ
ーションが終了した周辺機能シミュレーション部と同じ
識別子が格納されている周辺処理情報を検索し、当該周
辺処理情報に入出力管理部によって算出された割り込み
処理を行なう時点のCPU経過時間が格納されていない
とき当該周辺処理情報の削除を行い、また、入出力管理
部によって割り込み要求を行なう時点のCPU経過時間
が算出された際に、周辺処理情報格納部の格納内容を参
照し、算出されたCPU経過時間より後にだされた処理
要求に関する周辺処理情報がある場合は、この周辺処理
情報を削除し、また、周辺処理情報格納部の格納内容を
参照し、最も古い割り込み処理を行なう時点のCPU経
過時間Tを検索し、当該CPU経過時間TがCPU経過
時間管理部に管理されている最も新しいCPU経過時間
よりも古く、かつ上記CPU経過時間Tが格納さえれて
いる周辺処理情報以外の周辺処理情報を参照した場合、
処理要求が行なわれた時点のCPU経過時間が前記CP
U経過時間Tより古く、かつ、割り込みを処理を行なう
時点のCPU経過時間の値が格納されていない周辺処理
情報が存在しない場合、上記CPU経過時間Tを含む周
辺処理情報を削除する。
According to a third aspect of the present invention, in the simulator according to the second aspect, the peripheral processing information management section refers to the stored contents of the peripheral processing information storage section when the simulation of the peripheral function simulation section is completed, The peripheral processing information storing the same identifier as that of the peripheral function simulation unit for which the simulation is completed is searched, and the CPU elapsed time at the time of performing the interrupt processing calculated by the input / output management unit is not stored in the peripheral processing information. At this time, when the peripheral processing information is deleted, and when the CPU elapsed time at the time of issuing an interrupt request by the input / output management unit is calculated, the stored contents of the peripheral processing information storage unit are referred to If there is peripheral processing information related to the processing request issued after the time, delete this peripheral processing information, and The CPU elapsed time T at the time when the oldest interrupt processing is performed is referred to by referring to the stored contents of the peripheral processing information storage unit, and the CPU elapsed time T is the newest CPU elapsed time managed by the CPU elapsed time management unit. When the peripheral processing information other than the peripheral processing information older than the CPU elapsed time T is stored is referred to,
The CPU elapsed time at the time when the processing request is made is the CP
When there is no peripheral processing information older than the U elapsed time T and in which the value of the CPU elapsed time at the time of processing the interrupt does not exist, the peripheral processing information including the CPU elapsed time T is deleted.

【0022】割り込み再発生制御部が、周辺処理情報格
納部の格納内容を参照し、割り込み処理を行なう時点の
CPU経過時間が現在のCPU経過時間管理部に管理さ
れているCPU経過時間と等しい周辺処理情報があるか
どうか検索し、有る場合は、CPUシミュレーション部
が再度割り込み処理を行なわせる。請求項4の発明で
は、請求項1記載のシミュレータにおいて、履歴情報管
理部が、前記CPUシミュレーション部から前記周辺機
能シミュレーション部に対して処理要求が発生した直後
から前記周辺機能シミュレーション部から前記CPUシ
ミュレーション部に対して割込み要求が発生するまでの
間だけ動作する。
The interrupt reoccurrence control unit refers to the contents stored in the peripheral processing information storage unit, and the CPU elapsed time at the time of performing interrupt processing is equal to the CPU elapsed time managed by the current CPU elapsed time management unit. Whether or not there is processing information is searched, and if there is, processing is performed again by the CPU simulation unit. According to a fourth aspect of the present invention, in the simulator according to the first aspect, the history information management unit causes the peripheral function simulation unit to perform the CPU simulation immediately after the CPU simulation unit issues a processing request to the peripheral function simulation unit. It operates only until an interrupt request is issued to the unit.

【0023】請求項5の発明では、請求項2記載のシミ
ュレータにおいて、履歴情報管理部が前記周辺処理情報
格納部に前記周辺処理情報が1個以上格納されている間
だけ動作する。請求項6の発明では、請求項1、2記載
のシミュレータにおいて、状態復元部が、前記CPUシ
ミュレーション部に割込み要求があった場合、前記履歴
情報管理部に格納されている履歴情報のうち内部状態が
割込み許可状態であり、且つCPU経過時間が前記経過
時間Tに等しいあるいは前記経過時間Tより大きくかつ
前記経過時間Tに最も近いという条件をみたす履歴情報
Hを前記履歴情報管理部から検索し前記CPUシミュレ
ーション部を前記履歴情報Hの内部状態と同じ状態に
し、前記CPU経過時間管理部に格納されているCPU
経過時間を前記経過時間Tに更新する。
According to a fifth aspect of the invention, in the simulator according to the second aspect, the history information management section operates only while one or more pieces of the peripheral processing information are stored in the peripheral processing information storage section. According to a sixth aspect of the present invention, in the simulator according to the first and second aspects, when the state restoration unit issues an interrupt request to the CPU simulation unit, the internal state of the history information stored in the history information management unit is included. Is an interrupt enabled state, and the history information H satisfying the condition that the CPU elapsed time is equal to the elapsed time T or greater than the elapsed time T and closest to the elapsed time T is retrieved from the history information management unit, and The CPU simulation unit is set to the same state as the internal state of the history information H, and the CPU stored in the CPU elapsed time management unit
The elapsed time is updated to the elapsed time T.

【0024】[0024]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。 (実施例1)図1は本発明の実施例1におけるシミュレ
ータの構成図であり、11はCPUシミュレーション部
であり、CPUの命令実行をシミュレーションするもの
であり、必要に応じてシミュレーション中に後述する周
辺機能シミュレーション部14に対して処理要求をおこ
なったり、周辺機能シミュレーション部14からの割り
込み要求に対応する処理を行なうものである。
Embodiments of the present invention will now be described in detail with reference to the drawings. (Embodiment 1) FIG. 1 is a block diagram of a simulator in Embodiment 1 of the present invention, and 11 is a CPU simulation unit for simulating instruction execution of a CPU, which will be described later during the simulation as necessary. This is to issue a processing request to the peripheral function simulation section 14 or perform processing corresponding to an interrupt request from the peripheral function simulation section 14.

【0025】12はCPU経過時間管理部であり、CP
Uシミュレーション部11でシミュレーションする命令
を実機上で処理した場合、処理に要する時間の累計(以
下CPU経過時間と称する)を計算し格納するものであ
る。13は履歴情報管理部であり、CPUシミュレーシ
ョン部11の内部状態が変化するごとに状態変化が始ま
る直前の時点のCPU経過時間をCPU経過時間管理部
12から取りだし、このCPU経過時間と内部状態を対
応づけて履歴情報として、管理するものである。尚、内
部状態としては、レジスタ状態やRAM(ランダムアク
セスメモリ)などが上げられるが、この2つの情報に限
ったものではなく、シミュレーションする際に必要な状
態ならばかまわない。例えば、命令よみとり時のパイプ
ライン処理まで、シミュレーションする場合には、パイ
プライン処理状態も内部状態に含まれるし、RAMを使
用しない場合は、RAM状態は内部状態に含めなくても
よい。
Reference numeral 12 denotes a CPU elapsed time management unit, which is a CP.
When an instruction to be simulated by the U simulation unit 11 is processed on an actual machine, a cumulative total of processing time (hereinafter referred to as CPU elapsed time) is calculated and stored. Reference numeral 13 denotes a history information management unit, which takes out the CPU elapsed time immediately before the state change starts every time the internal state of the CPU simulation unit 11 changes from the CPU elapsed time management unit 12, and stores the CPU elapsed time and the internal state. It is managed in association with the history information. The internal state may be a register state, a RAM (random access memory), or the like, but the internal state is not limited to these two pieces of information, and any state necessary for simulation may be used. For example, in the case of simulating the pipeline processing at the time of reading an instruction, the pipeline processing state is included in the internal state, and when the RAM is not used, the RAM state may not be included in the internal state.

【0026】14は周辺機能シミュレーション部であ
り、CPUの周辺機能の処理動作をシミュレーションす
るものであり、CPUシミュレーション部11からの処
理要求に応じて周辺機能の処理動作のシミュレーション
を開始し、必要に応じて上記CPUシミュレーション部
11に対して割り込み要求を行なうものである。15は
周辺機能経過時間管理部であり、周辺機能シミュレーシ
ョン部14でシミュレーションする処理を実際の機械で
処理した場合、処理に要する時間の累計(以下周辺機能
経過時間と称する)を計算し格納するものである。
Reference numeral 14 denotes a peripheral function simulation section for simulating the processing operation of the peripheral function of the CPU, and starts the simulation of the processing operation of the peripheral function in response to a processing request from the CPU simulation section 11, and In response, an interrupt request is issued to the CPU simulation section 11. Reference numeral 15 denotes a peripheral function elapsed time management unit, which calculates and stores a cumulative total of time required for processing (hereinafter referred to as peripheral function elapsed time) when the processing simulated by the peripheral function simulation unit 14 is processed by an actual machine. Is.

【0027】18は入出力管理部であり、前記CPUシ
ミュレーション部11から、周辺機能シミュレーション
部14に対して処理要求があると、その処理要求が発生
した時点でのCPU経過時間(処理要求時CPU経過時
間)と、周辺機能経過時間とを、それぞれCPU経過時
間管理部12、周辺機能経過時間管理部15から取り出
し、後述する周辺処理情報格納部17に出力するもので
あり、さらに、周辺機能シミュレーション部14から、
前記CPUシミュレーション部11に割込み要求があっ
た場合は、周辺機能経過時間管理部15格納されている
この割り込み要求があった時点での周辺機能経過時間
と、周辺処理情報管理部に格納されているこの割り込み
要求が発生する基となった処理要求が発生した際の処理
要求時CPU経過時間と周辺機能経過時間とから、CP
Uシミュレーション部11が、どの時点にもどって割り
込みを行なうか、その割り込み処理を行なう時点のCP
U経過時間(戻り先CPU経過時間)を算出し、さらに
算出された結果を後述する状態復元部16に出力する。
尚、具体的な戻り先CPU経過時間の算出方法につい
は、後述するシミュレータの処理動作の説明の際に詳し
く行なう。
Reference numeral 18 denotes an input / output management unit that, when a processing request is issued from the CPU simulation unit 11 to the peripheral function simulation unit 14, the CPU elapsed time at the time when the processing request is issued (the CPU when processing is requested) (Elapsed time) and peripheral function elapsed time are extracted from the CPU elapsed time management unit 12 and the peripheral function elapsed time management unit 15, respectively, and output to the peripheral processing information storage unit 17 described later. From part 14,
When the CPU simulation unit 11 makes an interrupt request, the peripheral function elapsed time management unit 15 stores the peripheral function elapsed time at the time of the interrupt request and the peripheral processing information management unit. From the CPU elapsed time at the time of the processing request and the peripheral function elapsed time when the processing request on which this interrupt request was generated occurs, the CP
CP at which point the U simulation unit 11 returns the interrupt, or when the interrupt process is performed
U elapsed time (return destination CPU elapsed time) is calculated, and the calculated result is output to the state restoration unit 16 described later.
Note that a specific method of calculating the elapsed CPU at the return destination will be described in detail when the processing operation of the simulator described later is described.

【0028】17は周辺処理情報格納部であり、前記C
PUシミュレーション部11から周辺機器シミュレーシ
ョン部に処理要求があった際に、入出力管理部18から
出力された処理要求時CPU経過時間と周辺機能経過時
間とを対応づけて周辺処理情報として格納するものであ
る。16は状態復元部であり、周辺機能シミュレーショ
ン部からCPUシミュレーション部11に対して、割り
込み要求があった際に、入出力管理部18によって算出
された戻り先CPU経過時間TC1が入力されると、履
歴情報管理部13の格納内容を参照し、履歴情報のCP
U経過時間が、入力された戻り先CPU経過時間に等し
い、あるいは入力された戻り先CPU経過時間に最も近
いという、条件をみたす履歴情報Hを前記履歴情報管理
部13から検索し、CPUシミュレーション部11の内
部状態を、履歴情報Hの内部状態と同じ状態にし、CP
U経過時間管理部12に格納されているCPU経過時間
を、入力された戻り先CPU経過時間に更新し、CPU
シミュレーション部11を割り込み処理を行う状態に戻
すものである。
Reference numeral 17 denotes a peripheral processing information storage section, which is the C
When a processing request is issued from the PU simulation section 11 to the peripheral device simulation section, the CPU elapsed time at the processing request output from the input / output management section 18 and the peripheral function elapsed time are associated and stored as peripheral processing information. Is. Reference numeral 16 denotes a state restoration unit, which receives a return CPU elapsed time TC1 calculated by the input / output management unit 18 when an interrupt request is issued from the peripheral function simulation unit to the CPU simulation unit 11, The history information CP is referred to by referring to the stored contents of the history information management unit 13.
The history information management unit 13 searches the history information management unit 13 for history information H that satisfies the condition that the U elapsed time is equal to the input return destination CPU elapsed time or is the closest to the input return destination CPU elapsed time. The internal state of 11 is made the same as the internal state of the history information H, and CP
The CPU elapsed time stored in the U elapsed time management unit 12 is updated to the input return destination CPU elapsed time, and the CPU
This is to return the simulation unit 11 to the state of performing interrupt processing.

【0029】次に上記シミュレータの動作について図2
〜5に示すフローチャートを参照しながら説明する。
尚、図2はCPUシミュレーションン部11の処理動
作、図3には周辺機能シミュレーション部14の処理動
作、図4には、入出力管理部18の処理動作、図5には
状態復元部16の処理動作のフローチャートが示されて
いる。
Next, the operation of the simulator will be described with reference to FIG.
This will be described with reference to the flowcharts shown in FIGS.
2 is a processing operation of the CPU simulation section 11, a processing operation of the peripheral function simulation section 14 in FIG. 3, a processing operation of the input / output management section 18 in FIG. 4, and a state restoration section 16 in FIG. A flowchart of the processing operation is shown.

【0030】先ず、CPUシミュレーション部11は周
辺機能シミュレーション部14から割込み要求があるか
どうか調べる(Sc1)。割込み要求がある場合は、状
態復元部16によって割り込み要求の処理を行なう状態
に戻されると、割込み処理をシミュレーションする(S
c2)。尚、この割り込み要求を行なう状態に戻す処理
については後で、詳細に記載する。
First, the CPU simulation section 11 checks whether or not there is an interrupt request from the peripheral function simulation section 14 (Sc1). If there is an interrupt request, the state restoration unit 16 returns to the state in which the interrupt request is processed, and the interrupt process is simulated (S
c2). The process of returning to the interrupt request state will be described in detail later.

【0031】Sc2における割り込み処理が終了する
か、或いは、Sc1で割り込み要求がないと判断される
と、CPUシミュレーション部11は、シミュレーショ
ン対象CPU上のプログラムを1命令読み込み、この命
令を解釈を行なう(Sc3)。次に、その命令が周辺機
能への処理要求であるか否か判断する(Sc4)。Sc
4において命令が、周辺機能への処理要求でないと判断
された場合は、命令の実行をシミュレーションする(S
c7)。このように、命令実行のシミュレーションが開
始された場合は、履歴情報管理部13は、命令に対する
実行のシミュレーション開始時点でのCPU経過時間を
CPU経過時間管理部12から取りだし、CPUシミュ
レーション部11の内部状態と対応づけて履歴情報とし
て格納するように履歴情報管理部13に指示し(Sc
8)、CPU経過時間管理部12にCPU経過時間を格
納するように指示し(Sc9)、Sc1の状態に戻る。
上記Sc8の指示によって履歴情報管理部13は、履歴
情報を格納し、Sc9の指示によってCPU経過時間管
理部12はその命令実行後のCPU経過時間を格納す
る。
When the interrupt processing in Sc2 is completed or when it is determined in Sc1 that there is no interrupt request, the CPU simulation section 11 reads one instruction of the program on the simulation target CPU and interprets this instruction ( Sc3). Next, it is determined whether or not the instruction is a processing request to the peripheral function (Sc4). Sc
If it is determined in 4 that the instruction is not a processing request to the peripheral function, the execution of the instruction is simulated (S
c7). In this way, when the instruction execution simulation is started, the history information management unit 13 retrieves the CPU elapsed time at the start of execution simulation for the instruction from the CPU elapsed time management unit 12, and the internal CPU simulation unit 11 The history information management unit 13 is instructed to store the history information in association with the state (Sc
8) The CPU elapsed time management unit 12 is instructed to store the CPU elapsed time (Sc9), and the state returns to Sc1.
The history information management unit 13 stores the history information according to the instruction of Sc8, and the CPU elapsed time management unit 12 stores the CPU elapsed time after the instruction is executed according to the instruction of Sc9.

【0032】また、Sc4において命令が、周辺機能へ
の処理要求であると判断されると、CPUシミュレーシ
ョン部11は、周辺機能シミュレーション部14に処理
要求を行い(Sc5)、続いて、入出力管理部18に対
して、処理要求が発生したことを通知する(Sc6)。
このように処理要求の通知が終了すると、CPU経過時
間管理部12から、処理要求が発生した時点でのCPU
経過時間を取り出し、CPUシミュレーション部11の
内部状態と対応付けて履歴情報として格納するよう履歴
情報格納部に指示する(Sc8)。また、CPU経過時
間管理部12に処理要求発生時のCPU経過時間を格納
するよう指示する(Sc9)。次に、CPUシミュレー
ション部11は、Sc1まで戻り、以上の処理を繰り返
す。履歴情報管理部13及びCPU経過時間管理部12
は指示に従いそれぞれ、履歴情報、或いはCPU経過時
間の格納を行なう。
When it is determined in Sc4 that the instruction is a processing request to the peripheral function, the CPU simulation section 11 makes a processing request to the peripheral function simulation section 14 (Sc5), and then the input / output management is performed. The unit 18 is notified that a processing request has been issued (Sc6).
When the notification of the processing request is thus completed, the CPU elapsed time management unit 12 determines the CPU at the time when the processing request is issued.
The history information storage unit is instructed to extract the elapsed time and store it as history information in association with the internal state of the CPU simulation unit 11 (Sc8). Further, the CPU elapsed time management unit 12 is instructed to store the CPU elapsed time when the processing request is generated (Sc9). Next, the CPU simulation unit 11 returns to Sc1 and repeats the above processing. History information management unit 13 and CPU elapsed time management unit 12
Stores history information or CPU elapsed time according to the instruction.

【0033】以上のような処理をCPUシミュレーショ
ン部11が行なっている間、周辺機能シミュレーション
部14は並行して以下のように動作を行なっている。ま
ずCPUシミュレーション部11から処理要求があるま
で待機する(Ss1)。上記したように、Sc5におい
てCPUシミュレーション部11から処理要求がある
と、周辺機能シミュレーション部14は周辺機能のシミ
ュレーションを開始する(Ss2)。
While the CPU simulation section 11 is performing the above processing, the peripheral function simulation section 14 operates in parallel as follows. First, the CPU simulation unit 11 waits for a processing request (Ss1). As described above, when there is a processing request from the CPU simulation unit 11 in Sc5, the peripheral function simulation unit 14 starts the simulation of peripheral functions (Ss2).

【0034】次にシミュレーション上にCPUシミュレ
ーション部11に対して、割込み要求が発生するか否か
判断する(Ss3)。割り込み処理が発生する場合は、
入出力管理部18に割込み要求が発生したことを通知し
(Ss4)、さらにCPUシミュレーション部11に割
込み要求を行なう(Ss5)。次に、周辺機能経過時間
管理部15に、割り込み要求が発生した時点の周辺機能
経過時間を格納するように指示し(Ss6)、このとき
周辺機能経過時間管理部15は周辺機能経過時間を格納
する。次に周辺機能シミュレーションの処理が終了した
か否か判断する(Ss7)。但し、割り込み要求が発生
した場合は、その時点で処理終了とみなすので、Ss1
に戻る。
Then, it is judged on the simulation whether or not an interrupt request is issued to the CPU simulation section 11 (Ss3). If interrupt processing occurs,
The input / output management unit 18 is notified that an interrupt request has occurred (Ss4), and the CPU simulation unit 11 is requested to execute an interrupt request (Ss5). Next, the peripheral function elapsed time management unit 15 is instructed to store the peripheral function elapsed time when the interrupt request is generated (Ss6), and at this time, the peripheral function elapsed time management unit 15 stores the peripheral function elapsed time. To do. Next, it is determined whether or not the peripheral function simulation process is completed (Ss7). However, when an interrupt request is generated, it is considered that the processing is completed at that point, so Ss1
Return to.

【0035】Ss3において、割り込みが発生しないと
判断された場合は、周辺機能の処理動作のシミュレーシ
ョンが終了したかどうか判断し(Ss7)、終了してい
れば、Ss1に戻り、終了していない場合は、Ss2に
戻りSs2〜Ss7の処理を繰り返し行なう。入出力管
理部18は、CPUシミュレーション部11および周辺
機能シミュレーション部14と並行して以下のように動
作する。
If it is determined in Ss3 that the interrupt does not occur, it is determined whether or not the simulation of the processing operation of the peripheral function is finished (Ss7). If it is finished, the process returns to Ss1 and is not finished. Returns to Ss2 and repeats the processing of Ss2 to Ss7. The input / output management unit 18 operates as follows in parallel with the CPU simulation unit 11 and the peripheral function simulation unit 14.

【0036】先ず、入出力管理部18は、CPUシミュ
レーション部11からの周辺機能シュミュレーション部
への処理要求の発生、及び、周辺機能シミュレーション
部14からのCPUシミュレーション部11への割り込
み要求が発生しているかどうかを監視している(Si
1)。Sc6におけるCPUシミュレーション部11の
処理要求発生の通知に基づき、処理要求が発生したと判
断されると(Si1)、周辺機能シミュレーション部1
4への処理要求があった時点でのCPU経過時間である
処理要求時CPU経過時間及び周辺機能経過時間を、C
PU経過時間管理部12、周辺機能経過時間管理部15
からそれぞれ取り出し、これらの時間を周辺処理情報格
納部17に出力する。周辺処理情報格納部17は、出力
されたそれぞれの経過時間を対応付けて格納する(Si
2)。
First, the input / output management unit 18 generates a processing request from the CPU simulation unit 11 to the peripheral function simulation unit and an interrupt request from the peripheral function simulation unit 14 to the CPU simulation unit 11. Is being monitored (Si
1). When it is determined that the processing request is generated based on the notification of the processing request generation of the CPU simulation unit 11 in Sc6 (Si1), the peripheral function simulation unit 1
The CPU elapsed time at the time of processing request and the peripheral function elapsed time, which are the CPU elapsed time at the time when there is a processing request to
PU elapsed time management unit 12, peripheral function elapsed time management unit 15
Respectively, and outputs these times to the peripheral processing information storage unit 17. The peripheral processing information storage unit 17 stores the output elapsed times in association with each other (Si
2).

【0037】また、Ss4において周辺機能シミュレー
ション部14から割込み要求が発生した場合は(Si
3)、以下のようにしてCPUシミュレーション部11
が、どの時点にもどって割り込みを行なうか、その割り
込み処理を行なう時点のCPU経過時間である戻り先C
PU経過時間を算出する(Si4)。先ず、周辺機能経
過時間管理部15の格納内容を参照し、割り込み要求が
発生した時点の周辺機能経過時間(TS1)を取りだ
す。次に、周辺処理情報管理部の格納内容を参照し、こ
の割り込み要求が発生する基となった処理要求が発生し
た際の処理発生時CPU経過時間と周辺機能経過時間と
して、最も新しく格納された周辺処理情報の処理発生時
CPU経過時間(TC0)と周辺機能経過時間(TS
0)を取り出す。
When an interrupt request is issued from the peripheral function simulation section 14 in Ss4 (Si
3), the CPU simulation unit 11 as follows
However, at which point in time the interrupt is returned, or the return destination C which is the CPU elapsed time at the time of performing the interrupt process
The PU elapsed time is calculated (Si4). First, referring to the stored contents of the peripheral function elapsed time management unit 15, the peripheral function elapsed time (TS1) at the time when the interrupt request is generated is taken out. Next, by referring to the stored contents of the peripheral processing information management unit, the CPU elapsed time at the time of processing occurrence and the peripheral function elapsed time when the processing request that caused this interrupt request occurs is stored most recently. CPU elapsed time (TC0) when peripheral processing information processing occurs and peripheral function elapsed time (TS
0) is taken out.

【0038】このように取り出された周辺処理情報の周
辺機能経過時間(TS0)を割り込み発生時の周辺機能
経過時間(TS1)から引いた値を、処理発生時CPU
経過時間(TC0)に加えることによって、戻り先CP
U経過時間が算出される(Si4)。算出された戻り先
CPU経過時間は、状態復元部16に出力される(Si
5)。
A value obtained by subtracting the peripheral function elapsed time (TS0) of the peripheral processing information thus extracted from the peripheral function elapsed time (TS1) at the time of the interrupt occurrence is the CPU at the time of processing occurrence.
Returning CP by adding to the elapsed time (TC0)
U elapsed time is calculated (Si4). The calculated return destination CPU elapsed time is output to the state restoration unit 16 (Si
5).

【0039】戻り先CPU経過時間の出力がおこなわれ
た後は、処理要求が発生しているかどうか調べるステッ
プ(Si1)まで戻り、以上の処理を繰り返す。状態復
元部16は、入力間理部から戻り先CPU経過時間TC
1が入力されるかどうかを監視している(Sr1)。入
出力管理部18から戻り先CPU経過時間が入力される
と(Sr1)、履歴情報管理部13の格納内容を参照
し、格納されている履歴情報のうちCPU経過時間が入
力された戻り先CPU経過時間に等しい、あるいは入力
された戻り先CPU経過時間より大きく、且つ、最も近
いという条件をみたす履歴情報Hを検索する(Sr
2)。
After the return destination CPU elapsed time is output, the process returns to the step (Si1) for checking whether a processing request is generated, and the above processing is repeated. The state restoring unit 16 returns the elapsed CPU time TC from the input processing unit.
It is monitored whether 1 is input (Sr1). When the return destination CPU elapsed time is input from the input / output management unit 18 (Sr1), the stored content of the history information management unit 13 is referred to, and the return destination CPU to which the CPU elapsed time is input from the stored history information is input. The history information H satisfying the condition that it is equal to the elapsed time or larger than the input return destination CPU elapsed time and is the closest is retrieved (Sr.
2).

【0040】さらに、CPUシミュレーション部11を
履歴情報Hの内部状態と同じ状態にし、CPU経過時間
管理部12のCPU経過時間をTC1に更新し(Sr
3)、以上の処理を繰り返す。このように、状態復元部
16によって、CPUシミュレーション部11の内部状
態が割り込み処理を行なう状態に戻され、CPU経過時
間格納部の格納内容が更新されると(Sc1)、CPU
シミュレーション部11は割り込み処理を開始する(s
c2)。
Further, the CPU simulation unit 11 is set to the same state as the internal state of the history information H, and the CPU elapsed time of the CPU elapsed time management unit 12 is updated to TC1 (Sr.
3), the above processing is repeated. In this way, when the state restoration unit 16 returns the internal state of the CPU simulation unit 11 to the state in which interrupt processing is performed and the stored contents of the CPU elapsed time storage unit are updated (Sc1), the CPU
The simulation unit 11 starts interrupt processing (s
c2).

【0041】上記のようなシミュレータの処理動作を具
体的な例を用いて説明する。CPUシミュレーション部
11が実機CPUが1秒間で行なう処理を1秒間でシミ
ュレーションし、周辺機能シミュレーション部14が実
機周辺装置が1秒間で行なう処理をTP秒間(TPは1
より大きい)でシミュレーショを行なうものとする。
The processing operation of the simulator as described above will be described using a specific example. The CPU simulation unit 11 simulates the processing performed by the actual machine CPU in 1 second in 1 second, and the peripheral function simulation unit 14 performs the processing performed by the actual machine peripheral device in 1 second for TP seconds (TP is 1
Greater than) to simulate.

【0042】上記のようなCPUシミュレーション部1
1と周辺機能シミュレーション部14を有するシミュレ
ータを用い、CPU経過時間がT1秒のときCPUシミ
ュレーション部11から周辺機能シミュレーション部1
4に処理要求があり、CPU経過時間がT2秒のときこ
の処理要求に対する周辺機能シミュレーション部14の
処理が終了し、CPU経過時間がT3秒のとき再びCP
Uシミュレーション部11から周辺機能シミュレーショ
ン部14に処理要求があり、CPU経過時間がT4秒の
とき周辺機能シミュレーション部14からCPUシミュ
レーション部11に割込み要求がある場合を例とする。
CPU simulation unit 1 as described above
1 and a peripheral function simulation unit 14 are used, and when the CPU elapsed time is T1 seconds, the CPU simulation unit 11 to the peripheral function simulation unit 1
4 has a processing request, and when the CPU elapsed time is T2 seconds, the processing of the peripheral function simulation unit 14 for this processing request ends, and when the CPU elapsed time is T3 seconds, CP
An example is given in which the U simulation unit 11 issues a processing request to the peripheral function simulation unit 14, and the peripheral function simulation unit 14 issues an interrupt request to the CPU simulation unit 11 when the CPU elapsed time is T4 seconds.

【0043】実際の処理経過時間がT1秒になるまで
は、CPUシミュレーション部11は、割り込み要求は
ないので(Sc1)、命令実行シミュレーションを行う
(Sc3〜Sc7)。この命令実行シミュレーションご
とに(Sc7)、履歴情報管理部13に指示して、CP
U経過時間管理部12からCPU経過時間を取りだし、
CPUシミュレーション部11の内部状態と対応づけて
格納させ(Sc8)、かつ、CPU経過時間管理部12
に指示し、CPU経過時間を格納させる(Sc9)。処
理経過時間がT1秒になるまでは、CPUシミュレーシ
ョン部11では、このような処理が繰り返し行なわれ
る。
Until the actual elapsed processing time reaches T1 seconds, the CPU simulation section 11 does not make an interrupt request (Sc1), and therefore executes an instruction execution simulation (Sc3 to Sc7). For each instruction execution simulation (Sc7), the history information management unit 13 is instructed to execute the CP
The CPU elapsed time is retrieved from the U elapsed time management unit 12,
The CPU simulation unit 11 is stored in association with the internal state (Sc8), and the CPU elapsed time management unit 12 is stored.
The CPU elapsed time is stored (Sc9). The CPU simulation unit 11 repeats such processing until the elapsed processing time reaches T1 seconds.

【0044】また、周辺機能シミュレーション部14は
処理要求待ち状態であり(Ss1)、入出力管理部18
は処理要求発生通知または割込み要求発生通知待ち状態
である。また、状態復元部16は、戻り先CPU経過時
間が入力されるのを待っている状態である(Sr1)。
Further, the peripheral function simulation section 14 is in a processing request waiting state (Ss1), and the input / output management section 18
Is a waiting state for a processing request occurrence notification or an interrupt request occurrence notification. The state restoration unit 16 is in a state of waiting for the input of the return destination CPU elapsed time (Sr1).

【0045】実際の処理経過時間がT1秒のとき、CP
Uシミュレーション部11は周辺シミュレーション部に
処理要求を行ない(Sc5)、入出力管理部18に処理
要求発生を通知する(Sc6)。この後、履歴情報の格
納の指示(Sc8)、CPU経過時間の格納の指示を
(Sc9)行なう。Sc5における処理要求を受けた周
辺機能シミュレーション部14は、周辺機能のシミュレ
ーションを開始する(Ss1からSs2に進む)。
When the actual elapsed processing time is T1 seconds, CP
The U simulation unit 11 makes a processing request to the peripheral simulation unit (Sc5) and notifies the input / output management unit 18 of the processing request generation (Sc6). Thereafter, an instruction to store history information (Sc8) and an instruction to store CPU elapsed time are issued (Sc9). The peripheral function simulation unit 14, which receives the processing request in Sc5, starts the simulation of the peripheral function (proceeds from Ss1 to Ss2).

【0046】また、処理要求発生の通知を受けた入出力
管理部18は、CPU経過時間管理部12から処理発生
時CPU経過時間(T1)を取りだし、周辺機能経過時
間管理部15からは周辺機能経過時間(T1/TP)を
取りだし対応付けて、周辺処理情報として周辺処理情報
格納部17に出力する(Si2)。周辺処理情報格納部
17は出力された周辺処理情報格納する。
Further, the input / output management unit 18 which has received the notification of the generation of the processing request fetches the CPU elapsed time (T1) at the time of processing occurrence from the CPU elapsed time management unit 12, and the peripheral function elapsed time management unit 15 receives the peripheral function. The elapsed time (T1 / TP) is taken out, correlated and output to the peripheral processing information storage unit 17 as peripheral processing information (Si2). The peripheral processing information storage unit 17 stores the output peripheral processing information.

【0047】処理経過時間がT1秒からT2秒の間は、
CPUシミュレーション部11と、CPU経過時間管理
部12と、履歴情報管理部13と、入出力管理部18
と、状態復元部16は、処理経過時間がT1秒までのと
きと同様に動作をする。また、周辺機能シミュレーショ
ン部14は、CPUシミュレーション部11において、
T1の時点で発生した処理要求に対する処理が行なわれ
る(Ss2)。
During the elapsed processing time from T1 seconds to T2 seconds,
CPU simulation unit 11, CPU elapsed time management unit 12, history information management unit 13, and input / output management unit 18
Then, the state restoration unit 16 operates in the same manner as when the processing elapsed time is up to T1 seconds. In addition, the peripheral function simulation unit 14 includes
The processing for the processing request generated at the time of T1 is performed (Ss2).

【0048】実際の処理経過時間がT2秒のときは、周
辺機能シミュレーション部14では、割り込み要求が発
生することなく、周辺機能のシミュレーションが終了
し、処理要求待ち状態に戻る(Ss6からSs1に戻
る)。また、CPUシミュレーション部11とCPU経
過時間管理部12と履歴情報管理部13と、入出力管理
部18と、状態復元部16とは、処理経過時間がT1秒
までのときと同じ動作をする。
When the actual processing elapsed time is T2 seconds, the peripheral function simulation unit 14 terminates the simulation of the peripheral function without generating an interrupt request and returns to the processing request waiting state (returns from Ss6 to Ss1). ). Further, the CPU simulation unit 11, the CPU elapsed time management unit 12, the history information management unit 13, the input / output management unit 18, and the state restoration unit 16 perform the same operation as when the processing elapsed time is up to T1 seconds.

【0049】処理経過時間がT2秒からT3秒の間は、
CPUシミュレーション部11、CPU経過時間管理部
12、履歴情報管理部13、周辺機能シミュレーション
部14は、入出力管理部18と、状態復元部16とは、
処理経過時間がT1秒までのときと同じである。処理経
過時間がT3秒のとき、CPUシミュレーション部11
は周辺シミュレーション部に処理要求を行ない(Sc
5)、入出力管理部18に処理要求発生を通知する(S
c6)。
During the elapsed processing time from T2 seconds to T3 seconds,
The CPU simulation unit 11, the CPU elapsed time management unit 12, the history information management unit 13, the peripheral function simulation unit 14, the input / output management unit 18, and the state restoration unit 16,
The processing elapsed time is the same as that up to T1 seconds. When the elapsed processing time is T3 seconds, the CPU simulation unit 11
Makes a processing request to the peripheral simulation unit (Sc
5) Notify the input / output management unit 18 that a processing request has occurred (S
c6).

【0050】Sc5における処理要求を受けた周辺機能
シミュレーション部14は、周辺機能のシミュレーショ
ンを開始する(Ss1からSs2に進む)。また、処理
要求発生の通知を受けた入出力管理部18は(Si
1)、CPU経過時間管理部12から処理要求時CPU
経過時間(T3)を取りだしかつ周辺機能経過時間管理
部15から周辺機能経過時間「T3/TP」を取りだし
周辺処理情報格納部17に出力する(Si2)。周辺処
理情報格納部17はこれらのこれらの時間を対応づけて
格納する。
The peripheral function simulation section 14, which has received the processing request in Sc5, starts the simulation of the peripheral function (proceeds from Ss1 to Ss2). Further, the input / output management unit 18 that has received the notification of the processing request occurrence
1), CPU when requesting processing from CPU elapsed time management unit 12
The elapsed time (T3) is taken out, and the peripheral function elapsed time “T3 / TP” is taken out from the peripheral function elapsed time management unit 15 and output to the peripheral processing information storage unit 17 (Si2). The peripheral processing information storage unit 17 stores these times in association with each other.

【0051】処理経過時間がT3秒からT4秒の間は、
処理経過時間がT1秒からT2秒までのときと同じであ
る。処理経過時間がT4秒のときは、周辺機能シミュレ
ーション部14は、入出力管理部18に割込み要求発生
を通知し(Ss4)、CPUシミュレーション部11に
割込み要求を行なう(Ss5)。
During the elapsed processing time T3 seconds to T4 seconds,
The processing elapsed time is the same as that from T1 second to T2 second. When the elapsed processing time is T4 seconds, the peripheral function simulation unit 14 notifies the input / output management unit 18 of the generation of an interrupt request (Ss4) and makes an interrupt request to the CPU simulation unit 11 (Ss5).

【0052】割り込み要求発生の通知を受け取った入出
力管理部18は(Si3)、周辺機能経過時間管理部1
5から、割り込み発生した時点の周辺機能経過時間T4
/TPを取りだし、さらに周辺処理情報格納部17から
処理発生時CPU経過時間T3と周辺機能経過時間T3
/TPを取りだし、戻り先CPU経過時間を算出する
(Si4)。更に、状態復元部16に算出された戻り先
CPU経過時間を出力する(Si5)。
The input / output management unit 18 having received the notification of the interrupt request generation (Si3), the peripheral function elapsed time management unit 1
From 5, the peripheral function elapsed time T4 at the time of the interrupt occurrence
/ TP, and the CPU elapsed time T3 at the time of processing occurrence and the peripheral function elapsed time T3 from the peripheral processing information storage unit 17.
/ TP is taken out, and the return destination CPU elapsed time is calculated (Si4). Further, the calculated return destination CPU elapsed time is output to the state restoration unit 16 (Si5).

【0053】状態復元部16は戻り先CPU経過時間が
入力されると(Sr1)、履歴情報管理部13の格納内
容を参照し、格納されている履歴情報のCPU経過時間
のうち入力された戻り先CPU経過時間と等しいか、あ
るいは入力された戻り先CPU経過時間より大きくかつ
最も近いという条件をみたす履歴情報Hを検索し(Sr
2)、CPUシミュレーション部11を履歴情報Hの内
部状態と同じ状態にし、CPU経過時間管理部12のC
PU経過時間T4を入力された戻り先CPU経過時間に
更新する。
When the return destination CPU elapsed time is input (Sr1), the state restoration unit 16 refers to the stored contents of the history information management unit 13 and refers to the input return of the CPU elapsed time of the stored history information. The history information H satisfying the condition that it is equal to the destination CPU elapsed time or greater than and closest to the input return destination CPU elapsed time is searched (Sr
2), the CPU simulation unit 11 is set to the same state as the internal state of the history information H, and C of the CPU elapsed time management unit 12 is set.
The PU elapsed time T4 is updated to the input return destination CPU elapsed time.

【0054】以上のようにしてシミュレータは、処理動
作を行ない、割り込みが発生した際だけ、CPUシミュ
レータは、割り込みを行なう状態に戻って、割り込み処
理を行なう。尚、本実施例では、履歴情報管理部13は
CPUシミュレーション部11の内部状態が変化するご
とに状態変化が始まる直前の時点のCPU経過時間をC
PU経過時間管理部12から取りだし、内部状態を対応
づけて履歴情報として管理しているが、履歴情報管理部
13は、CPUシミュレーション部11の内部状態が変
化するごとに状態変化が終った直後の時点のCPU経過
時間をCPU経過時間管理部12から取りだし内部状態
と対応づけて履歴情報として管理するように構成しても
よい。
As described above, the simulator performs the processing operation, and only when the interrupt occurs, the CPU simulator returns to the interrupting state and performs the interrupt processing. In the present embodiment, the history information management unit 13 sets the CPU elapsed time to C at the time immediately before the state change starts each time the internal state of the CPU simulation unit 11 changes.
The history information management unit 13 takes out from the PU elapsed time management unit 12 and manages the internal state in association with each other as history information. However, the history information management unit 13 immediately after the state change ends every time the internal state of the CPU simulation unit 11 changes. The CPU elapsed time at the time point may be taken out from the CPU elapsed time management unit 12 and associated with the internal state to be managed as history information.

【0055】このように構成する場合、状態復元部16
は、戻り先CPU経過時間TCIが格納された場合、履
歴情報管理部13に格納されている履歴情報のうちCP
U経過時間が、CPU経過時間Tに等しいあるいは、C
PU経過時間Tより小さくかつCPU経過時間Tに最も
近いという条件をみたす履歴情報Hを前記履歴情報管理
部13から検索しCPUシミュレーション部11を履歴
情報Hの内部状態と同じ状態にしCPU経過時間管理部
12に格納されているCPU経過時間をCPU経過時間
TC1に更新する。
In the case of such a configuration, the state restoration unit 16
Is the CP of the history information stored in the history information management unit 13 when the return CPU elapsed time TCI is stored.
U elapsed time is equal to CPU elapsed time T or C
History information H satisfying the condition that it is smaller than the PU elapsed time T and closest to the CPU elapsed time T is retrieved from the history information management unit 13, and the CPU simulation unit 11 is set to the same state as the internal state of the history information H to manage the CPU elapsed time. The CPU elapsed time stored in the unit 12 is updated to the CPU elapsed time TC1.

【0056】また履歴情報間管理部13は、履歴情報H
の内部状態は状態変化ごとに状態変化前後の差分だけを
管理する構成にしてもよい。さらに、履歴情報間管理部
13は、CPUシミュレーション部から周辺機能シミュ
レーション部に対して処理要求が発生した直後から周辺
機能シミュレーション部から前記CPUシミュレーショ
ン部に対して割込み要求が発生するまでの間だけ動作す
るように構成してもよい。
The inter-history information management unit 13 also uses the history information H
The internal state of may be configured to manage only the difference before and after the state change for each state change. Further, the history information management unit 13 operates only immediately after a processing request is issued from the CPU simulation unit to the peripheral function simulation unit until the interrupt request is issued from the peripheral function simulation unit to the CPU simulation unit. It may be configured to do so.

【0057】CPUシミュレーション部11の代わりに
周辺シミュレーション部を用いることにより2つの周辺
シミュレーション部で同期を実現したり、周辺シミュレ
ーション部の代わりにCPUシミュレーション部11を
用いて2つのCPUシミュレーション部で同期を実現し
ても良い。さらに、履歴情報管理部が内部状態として、
CPUシミュレーション部が割り込み許可状態か割り込
み禁止状態かを格納し、割り込み要求が起こった場合、
内部状態が割り込み許可の場合、割り込み処理を行い、
割り込み禁止場合は、割り込みが起こらないように構成
してもよい。
By using the peripheral simulation unit instead of the CPU simulation unit 11, the two peripheral simulation units can achieve synchronization, or by using the CPU simulation unit 11 instead of the peripheral simulation unit, the two CPU simulation units perform synchronization. May be realized. Furthermore, as the history information management unit has an internal state,
When the CPU simulation unit stores an interrupt enable state or an interrupt disable state and an interrupt request occurs,
If the internal state is interrupt enable, perform interrupt processing,
When the interrupt is disabled, the interrupt may not be generated.

【0058】(実施例2)図6は本発明の実施例2にお
けるシミュレータの構成図であり、図6において、24
1、242はそれぞれ周辺機能シミュレーション部であ
り、お互いを区別するため、それぞれが異なる識別子を
有していることと、周辺機能のシュミュレーションが終
了した際に後述する入出力順序制御部28にその旨を通
知する以外は、上記実施例1の周辺機能シミュレーショ
ン部と同様の処理を行なうものである。
(Embodiment 2) FIG. 6 is a block diagram of a simulator according to Embodiment 2 of the present invention. In FIG.
Reference numerals 1 and 242 denote peripheral function simulation units, which have different identifiers for distinguishing each other, and the input / output sequence control unit 28, which will be described later, when the simulation of peripheral functions is completed. The same processing as that of the peripheral function simulation unit of the first embodiment is performed except that the notification is made.

【0059】251は周辺機能経過時間管理部であり、
周辺機能シミュレーション部241でシミュレーション
した処理を、実機で処理した場合に要する時間の累計を
計算し格納するものであり、他の周辺機能経過時間管理
部と区別するために周辺機能シミュレータ241の識別
子と同じ識別子を有している。252は周辺機能経過時
間管理部であり、周辺機能シミュレーション部242で
シミュレーションした処理を、実機で処理した場合に要
する時間の累計を計算し格納するものであり、他の周辺
機能経過時間管理部と区別するために周辺機能シミュレ
ータ242の識別子と同じ識別子を有している。
Reference numeral 251 denotes a peripheral function elapsed time management unit,
The peripheral function simulation unit 241 calculates and stores a cumulative total of time required for processing by an actual machine, and is used as an identifier of the peripheral function simulator 241 to distinguish it from other peripheral function elapsed time management units. Have the same identifier. Reference numeral 252 denotes a peripheral function elapsed time management unit, which calculates and stores the cumulative time required when the processing simulated by the peripheral function simulation unit 242 is processed by an actual machine. In order to distinguish, it has the same identifier as that of the peripheral function simulator 242.

【0060】28は入出力順序制御部であり、CPUシ
ミュレーション部11から処理要求があった場合、CP
U経過時間管理部12に格納されている処理要求があっ
た時点のCPU経過時間(処理要求時CPU経過時間)
を検出し、続いて、処理要求が行なわれている周辺機能
シミュレーション部の識別子Iを確認し、同じ識別子を
有する周辺機能経過時間管理部に格納されている周辺機
能経過時間を検出し、検出した処理要求時CPU経過時
間、周辺機能経過時間と、識別子Iと対応付けて周辺処
理情報としてを後述する周辺処理情報格納部27に出力
し、周辺機能シミュレーション部において割り込み要求
が発生した場合は、CPUシミュレーション部11が、
どの時点に戻って割り込み処理を行なうのか、その割り
込みを行なう時点のCPU経過時間(戻り先CPU経過
時間)を実施例1と同様に算出し、算出のために用いた
周辺処理情報とともに、周辺処理情報管理部に格納さ
せ、さらに算出した結果を状態復元部16に出力し、周
辺処理情報管理部に格納されている周辺処理情報を参照
し、CPUシミュレーション部11のシミュレーション
に必要なくなった周辺処理情報を検索し、削除をおこな
い、CPUシミュレーション部11が正しい順序で割り
込み処理のシミュレーションを行なうように、割り込み
要求の発生を制御するものである。
Reference numeral 28 denotes an input / output sequence control unit, which is CP when there is a processing request from the CPU simulation unit 11.
CPU elapsed time at the time of a processing request stored in the U elapsed time management unit 12 (CPU elapsed time at the time of processing request)
Then, the identifier I of the peripheral function simulation unit for which the processing request is made is confirmed, and the peripheral function elapsed time stored in the peripheral function elapsed time management unit having the same identifier is detected and detected. When the CPU time at the time of processing request, the peripheral function elapsed time, and the identifier I are associated with each other, the peripheral processing information is output to the peripheral processing information storage unit 27, which will be described later. The simulation unit 11
Similar to the first embodiment, the CPU elapsed time (return destination CPU elapsed time) at the time of performing the interrupt and the interrupt processing is calculated, and the peripheral processing is used together with the peripheral processing information used for the calculation. The information is stored in the information management unit, the calculated result is output to the state restoration unit 16, the peripheral processing information stored in the peripheral processing information management unit is referred to, and the peripheral processing information unnecessary for the simulation of the CPU simulation unit 11 is obtained. Is executed and deleted, and the generation of the interrupt request is controlled so that the CPU simulation unit 11 performs the simulation of the interrupt processing in the correct order.

【0061】27は周辺情報格納部であり、処理要求時
CPU経過時間と周辺機能経過時間と戻り先CPU経過
時間と、識別子とを対応づけて、周辺処理情報として格
納するものである。尚、実施例1と同じ処理を行なうも
のについては、図6と同じ符号を付し、説明を省略す
る。次に上記シミュレータの動作について図7と図8に
示すフローチャートを参照しながら説明する。図7は周
辺機能シミュレーション部241、242の処理動作、
図8には入出力順序制御部28の処理動作のフローチャ
ートが示されている。
Reference numeral 27 denotes a peripheral information storage unit which stores the CPU elapsed time at the time of processing request, peripheral function elapsed time, return destination CPU elapsed time, and identifier in association with each other as peripheral processing information. It should be noted that the same processes as those in the first embodiment are designated by the same reference numerals as those in FIG. 6, and the description thereof will be omitted. Next, the operation of the simulator will be described with reference to the flowcharts shown in FIGS. FIG. 7 shows the processing operations of the peripheral function simulation units 241, 242.
FIG. 8 shows a flowchart of the processing operation of the input / output sequence control unit 28.

【0062】CPUシミュレーション部11は実施例1
の場合と同様にして、CPUのシミュレーションを行な
う。周辺機能シミュレーション部241および242
は、CPUシミュレーション部11と並行して動作す
る。ステップSs1からSs7までは実施例1の周辺機
能シミュレーション部14と同じ動作である。但し、S
s6において、周辺機能経過時間を格納する際には、同
じ識別子を有した周辺機能経過時間管理部に格納し、更
に、Ss8において、シミュレーションが終了した場合
には、その旨を入出力順序制御部28に出力する。(但
し、ここで言うシミュレーションの終了とは、CPUシ
ミュレーション部11からの処理要求に対する処理が終
わった場合は勿論のこと、周辺機能シミュレーション部
からCPUシミュレーション部11に対して割り込み発
生が起こった場合も、割り込みを発生したことでシミュ
レーション処理が終了したとして、終了の通知を行な
う。)入出力順序制御部28は、CPUシミュレーショ
ン部11および周辺機能シミュレーション部241およ
び242と並行して以下のように動作する。
The CPU simulation unit 11 is the first embodiment.
CPU simulation is performed in the same manner as in the above case. Peripheral function simulation units 241 and 242
Operates in parallel with the CPU simulation unit 11. The operations from steps Ss1 to Ss7 are the same as those of the peripheral function simulation unit 14 of the first embodiment. However, S
When the peripheral function elapsed time is stored in s6, it is stored in the peripheral function elapsed time management unit having the same identifier, and when the simulation is completed in Ss8, that effect is input / output sequence control unit. To 28. (However, the end of the simulation here means not only the case where the processing for the processing request from the CPU simulation section 11 is completed, but also the case where an interrupt occurs from the peripheral function simulation section to the CPU simulation section 11). , And the end of the simulation process is notified by the generation of the interrupt.) The input / output sequence control unit 28 operates as follows in parallel with the CPU simulation unit 11 and the peripheral function simulation units 241 and 242. To do.

【0063】まずCPUシミュレーション部11から処
理要求が発生しているか否か判断する(Si11)。処
理要求が発生している場合は、CPU経過時間管理部1
2から処理要求が起こった時点のCPU経過時間である
処理要求時CPU経過時間を取り出す。次に、処理要求
を受けた周辺シミュレーション部の識別子を確認し、そ
の識別子と同じ識別子を有する周辺機能経過時間管理部
から処理要求が発生した時点の周辺機能経過時間を取り
だす。このように取り出された処理要求時CPU経過時
間と、周辺機能経過時間と、さらに処理要求を受けた周
辺処理シミュレータの識別子Iとを対応付けてこれを周
辺処理情報として、周辺処理情報格納部27に出力する
(Si12)。周辺処理情報格納部27はSi12にお
いて、入出力順序制御部28によって出力された周辺処
理情報を格納する。
First, it is determined whether a processing request has been issued from the CPU simulation section 11 (Si11). When a processing request is issued, the CPU elapsed time management unit 1
The CPU elapsed time at the time of processing request, which is the CPU elapsed time at the time when the processing request is generated, is extracted from 2. Next, the identifier of the peripheral simulation unit that received the processing request is confirmed, and the peripheral function elapsed time at the time when the processing request is issued is taken out from the peripheral function elapsed time management unit having the same identifier as that identifier. The CPU elapsed time at the time of the processing request thus extracted, the peripheral function elapsed time, and the identifier I of the peripheral processing simulator that has received the processing request are associated with each other and used as peripheral processing information, and the peripheral processing information storage unit 27 To (Si12). The peripheral processing information storage unit 27 stores the peripheral processing information output by the input / output sequence control unit 28 in Si12.

【0064】次に周辺機能シミュレーション部から割込
み要求が発生しているか否か判断する(Si13)。割
込み要求が発生しているならば、以下のようにしてCP
Uシミュレーション部11が、どの時点にもどって割り
込みを行なうか、その割り込み処理を行なう時点のCP
U経過時間である戻り先CPU経過時間を算出する(S
i14)。
Next, it is judged whether or not an interrupt request is issued from the peripheral function simulation section (Si13). If an interrupt request has occurred, use the following CP
CP at which point the U simulation unit 11 returns the interrupt, or when the interrupt process is performed
The return destination CPU elapsed time, which is the U elapsed time, is calculated (S
i14).

【0065】先ず、割り込み要求が発生している周辺機
能シミュレーション部の識別子を確認し、同じ識別子を
有する周辺機能経過時間管理部から割り込み要求が発生
した時点の周辺機能経過時間を取りだす。続いて、周辺
処理情報格納部27から識別子Iに等しい識別子が対応
づけて格納されており、且つ、最も新しい周辺処理情報
を検索し、処理要求時CPU経過時間と周辺機能経過時
間を取りだす。
First, the identifier of the peripheral function simulation unit in which the interrupt request is generated is confirmed, and the peripheral function elapsed time at the time of the interrupt request is taken out from the peripheral function elapsed time management unit having the same identifier. Subsequently, an identifier equal to the identifier I is stored in association with the peripheral processing information storage unit 27, and the newest peripheral processing information is searched for to obtain the CPU elapsed time at the time of processing request and the peripheral function elapsed time.

【0066】このように取り出された、それぞれの経過
時間を基に、実施例1と同様に、戻り先CPU経過時間
を算出する(Si14)。次に、周辺処理情報格納部2
7の格納内容を参照し、上記のように算出された戻り先
CPU経過時間より新しい処理要求時CPU経過時間が
格納されている周辺処理情報が有るかどうか検索する
(Si15)、有る場合はこの周辺処理情報を削除する
(Si16)。(このように、周辺処理情報が削除でき
るのは、例えば、図9に示すように、処理要求時CPU
経過時間CT2が、戻り先CPU経過時間CT1より新けれ
ば、CPUシミュレーション部11がCPU経過時間C
T1の時点で割り込み処理を行なった後にシミュレーショ
ンを続行することにより、CPU経過時間がCT2の時点
で周辺機能シミュレータ部Bへ同じ処理要求が発生する
ので、この周辺処理情報を残しておく必要がなくなるた
めである。)さらに、上記戻り先CPU経過時間算出の
際に周辺処理情報格納部27から取り出された処理要求
時CPU経過時間と周辺機能経過時間に、算出された戻
り先CPU経過時間を対応付けて格納するように、周辺
処理情報格納部27に指示する。周辺処理情報格納部2
7は、これらの情報を格納する。続いて、状態復元部1
6に算出した結果を出力する(Si17)。
Based on the elapsed times thus extracted, the return destination CPU elapsed time is calculated in the same manner as in the first embodiment (Si14). Next, the peripheral processing information storage unit 2
By referring to the stored contents of No. 7, it is searched whether or not there is peripheral processing information in which a CPU elapsed time newer than the return destination CPU elapsed time calculated as described above is stored (Si15). The peripheral processing information is deleted (Si16). (In this way, the peripheral processing information can be deleted when, for example, as shown in FIG.
If the elapsed time C T2 is newer than the return destination CPU elapsed time C T1 , the CPU simulation unit 11 determines the CPU elapsed time C T2.
By continuing the simulation after performing the interrupt processing at the time of T1, the same processing request is generated to the peripheral function simulator unit B at the time of the CPU elapsed time C T2. Therefore, it is necessary to leave this peripheral processing information. Because it will disappear. ) Furthermore, the calculated return CPU elapsed time is stored in association with the processing request CPU elapsed time and peripheral function elapsed time retrieved from the peripheral processing information storage unit 27 when calculating the return CPU elapsed time. In this way, the peripheral processing information storage unit 27 is instructed. Peripheral processing information storage unit 2
7 stores these pieces of information. Then, the state restoration unit 1
The calculated result is output to 6 (Si17).

【0067】状態復元部16は、入出力順序制御部28
から戻り先CPU経過時間が入力されると(Sr1)、
履歴情報管理部13の格納内容を検索し、CPU経過時
間が上記戻り先CPU経過時間に等しい、あるいは戻り
先CPU経過時間より大きくかつ戻り先CPU経過時間
に最も近いという条件をみたす履歴情報Hを検索し(S
r2)、CPUシミュレーション部11を履歴情報Hの
内部状態と同じ状態にしCPU経過時間管理部12のC
PU経過時間をTC1に更新する(Sr3)。
The state restoration section 16 includes an input / output sequence control section 28.
When the return destination CPU elapsed time is input from (Sr1),
The stored information of the history information management unit 13 is searched, and history information H satisfying the condition that the CPU elapsed time is equal to the return destination CPU elapsed time, or is greater than the return destination CPU elapsed time and closest to the return destination CPU elapsed time is obtained. Search (S
r2), the CPU simulation unit 11 is set to the same state as the internal state of the history information H, and C of the CPU elapsed time management unit 12 is set.
The PU elapsed time is updated to TC1 (Sr3).

【0068】このように、CPUシミュレーション部1
1の内部状態と、CPU経過時間が更新されると、CP
Uシミュレーション部11は割り込み処理を行なう(S
c2)。次に入出力順序制御部28は、周辺機能シミュ
レーション部からシミュレーションの処理終了が通知さ
れたか否か判断し(Si18)、通知があった場合は、
終了処理の通知を行なった周辺処理シミュレーション部
の識別子Iを確認し、同じ識別子が対応付けて格納され
ている周辺処理情報を周辺処理情報格納部27の格納内
容を参照して、戻り先CPU経過時間の値が格納されて
いないならば、この周辺処理情報を周辺処理情報格納部
27から削除する(Si19)。
In this way, the CPU simulation unit 1
When the internal state of 1 and the CPU elapsed time are updated, CP
The U simulation unit 11 performs interrupt processing (S
c2). Next, the input / output sequence control unit 28 determines whether or not the peripheral function simulation unit has notified the end of simulation processing (Si18).
Confirm the identifier I of the peripheral processing simulation unit that has notified the end processing, and refer to the stored contents of the peripheral processing information storage unit 27 for the peripheral processing information in which the same identifier is associated and stored. If the time value is not stored, this peripheral processing information is deleted from the peripheral processing information storage unit 27 (Si19).

【0069】次にCPU経過時間管理部12からこの時
点でのCPU経過時間を取りだし、周辺処理情報格納部
27の格納内容を参照し、戻り先CPU経過時間が、取
り出したのCPU経過時間と等しい周辺処理情報がある
かどうか検索し、(Si20)、存在するならばその周
辺処理情報に基づいて、CPUシミュレーション部11
に対する割り込み要求の発生と、状態復元部16に戻り
先CPU経過時間の出力を行なう(Si21)。この
後、CPUシミュレーション部11では、割り込み処理
が行なわれる。(このような処理を行なうのは、例え
ば、図10で示すように、CPUシミュレーション部が
CPU経過時間がCT1の時点で周辺機能シミュレーショ
ン部Bからの割り込み処理を行ないこの後に、このCP
U経過時間C T1よりさらにまえの時点(CPU経過時間
T2)に戻って周辺機能シミュレーション部Aからの割
り込み処理を行なう状況が要求か起こった場合、実際の
CPU上では、Aからの割り込みに対する処理のあとに
Bからの割り込み処理を行なうのが正しい順序となる。
従って、CPUシミュレーション部が、正しい順序でシ
ミュレーションを行なうためには、CPU経過時間CT2
での割り込み処理の後に、一旦割り込み処理が終了した
周辺機能シミュレーション部Bからの割り込み処理を再
度行なわなければ成らない。このため、このようなステ
ップが設けられている。)つづいて、周辺処理情報格納
部27の格納内容を参照し、以下のような処理を行なっ
て、削除できる周辺処理情報が有るかどうか検討を行な
う。(Si22)先ず、最も古い戻り先CPU経過時間
(A)を検出する(戻り先CPU経過時間が格納されて
いるのが1つだけの場合は、これが最も古い戻り先CP
U経過時間となる)。さらに、以下の2つの条件を満た
すかどうか検討する。 検出された最も古い戻り先CPU経過時間(A)
が、CPU経過時間管理部12に管理されている最も新
しいCPU経過時間よりも古い。 検出された最も古い戻り先CPU経過時間(A)と
対応付けて格納されている識別子とは異なる識別子と対
応づけて格納されている周辺処理情報を検討した場合、
周辺処理情報の処理要求時CPU経過時間が検出された
最も古い戻り先CPU経過時間(A)より古く、且つ、
戻り先経過時間が格納されていない周辺処理情報が存在
しない。
Next, from the CPU elapsed time management unit 12
CPU processing time at the point is taken out, and peripheral processing information storage section
By referring to the stored contents of 27, the CPU elapsed time of the return destination is calculated.
There is peripheral processing information equal to the elapsed CPU time
Search for (Si20), and if it exists, its circumference
Based on the edge processing information, the CPU simulation unit 11
Generation of an interrupt request to and return to the state restoration unit 16
The previous CPU elapsed time is output (Si21). this
After that, in the CPU simulation unit 11, the interrupt processing is performed.
Is performed. (Doing this kind of processing is
For example, as shown in FIG.
CPU elapsed time is CT1At the time of
The interrupt processing from section B is performed and then this CP
U elapsed time C T1Before time (CPU elapsed time
CT2) Return from the peripheral function simulation section A
If the situation to perform the merge processing is a request or a request, the actual
On the CPU, after processing for the interrupt from A
The correct order is to perform interrupt processing from B.
Therefore, CPU simulation unit
In order to perform the simulation, the CPU elapsed time CT2
After the interrupt processing in, the interrupt processing was once completed
Interrupt processing from peripheral function simulation part B is re-executed.
It must be done once. Because of this,
Is provided. ) Next, store peripheral processing information
The following processing is performed by referring to the stored contents of the section 27.
And consider whether there is peripheral processing information that can be deleted.
U (Si22) First, the oldest return destination CPU elapsed time
(A) is detected (return destination CPU elapsed time is stored
If there is only one, this is the oldest return CP
U elapsed time). In addition, the following two conditions are met
Consider whether or not. Oldest detected return CPU elapsed time (A)
Is the newest managed by the CPU elapsed time management unit 12.
Older than the elapsed CPU time. The oldest detected return CPU time (A)
Pair with an identifier that is different from the identifier stored in association.
When considering the peripheral processing information stored correspondingly,
CPU elapsed time was detected when requesting processing of peripheral processing information
Older than the oldest return destination CPU elapsed time (A), and
There is peripheral processing information for which the return destination elapsed time is not stored.
do not do.

【0070】この条件を満たしている場合、最も古い戻
り先CPU経過時間(A)を含む周辺処理情報は削除し
てもよい周辺処理情報と見なし(Si22)、この周辺
処理情報を削除する(Si23)。(このような処理を
行なうのは、周辺処理情報のなかで、再度割り込み発生
を起こす可能性があるものとそうでないものを判定し、
再度割り込みを起こす可能性のないものについては削除
し、再度発生する可能性があるものもののみ残すために
行なわれている。)以上の処理が終了すると、入出力順
序制御部28は、処理要求が発生しているか調べるステ
ップまで戻り(Si11)以上の処理を繰り返す。
When this condition is satisfied, the peripheral processing information including the oldest return destination CPU elapsed time (A) is regarded as the peripheral processing information that may be deleted (Si22), and this peripheral processing information is deleted (Si23). ). (This kind of processing is performed by determining, in the peripheral processing information, those that may cause an interrupt again and those that do not.
This is done in order to delete those that are not likely to cause an interrupt again, and to leave only those that may occur again. ) When the above processing is completed, the input / output sequence control unit 28 returns to the step of checking whether a processing request is generated (Si11) and repeats the above processing.

【0071】以上のような処理を行なうシミュレータに
ついて、さらに具体的な場合を例に、その処理動作の説
明を行なう。先ず、各シミュレーション部の処理時間は
以下のようなものとする。CPUシミュレーション部1
1は、実機CPUが1秒間で行なう処理を1秒間でシミ
ュレーションする。
The processing operation of the simulator for performing the above processing will be described by taking a more specific example as an example. First, the processing time of each simulation unit is as follows. CPU simulation unit 1
In No. 1, the process performed by the actual CPU in 1 second is simulated in 1 second.

【0072】周辺機能シミュレーション部241は識別
子「I1 」で識別され、且つ、実機周辺装置が1秒間で
行なう処理を3秒間でシミュレーションする。周辺機能
シミュレーション部242は周辺識別子「I2 」で識別
され、且つ、実機周辺装置が1秒間で行なう処理を1.
5秒間でシミュレーションする。さらに、以下のような
流れ出、処理が進む場合と例にとする。
The peripheral function simulation section 241 is identified by the identifier "I 1 " and simulates the processing performed by the actual peripheral device in 1 second in 3 seconds. The peripheral function simulation unit 242 is identified by the peripheral identifier “I 2 ”, and the processing performed by the actual peripheral device in 1 second is 1.
Simulate in 5 seconds. Furthermore, the following flow and processing will be taken as examples.

【0073】CPU経過時間が10秒のとき、CPUシ
ミュレーション部11から周辺機能シミュレーション部
241に処理要求がある。CPU経過時間が20秒のと
き、CPUシミュレーション部11から周辺機能シミュ
レーション部242に処理要求がある。CPU経過時間
が30秒のとき、周辺機能シミュレーション部241か
らCPUシミュレーション部11に割込み要求がある。
When the CPU elapsed time is 10 seconds, the CPU simulation unit 11 issues a processing request to the peripheral function simulation unit 241. When the CPU elapsed time is 20 seconds, the CPU simulation unit 11 issues a processing request to the peripheral function simulation unit 242. When the CPU elapsed time is 30 seconds, the peripheral function simulation unit 241 issues an interrupt request to the CPU simulation unit 11.

【0074】CPU経過時間が40秒のとき、周辺機能
シミュレーション部242からCPUシミュレーション
部11に割込み要求がある。上記したように処理が進む
際の、実際の処理時間の累計である処理経過時間とCP
U経過時間との関係を図11に示す。先ず、実際の処理
経過時間が10秒になるまでは、CPUシミュレーショ
ン部11は命令実行シミュレーションを繰り返し(Sc
3〜Sc7)、履歴情報管理部13はCPUシミュレー
ション部11の命令実行シミュレーションごとに、CP
U経過時間管理部12からCPU経過時間を取りだし、
CPUシミュレーション部11の内部状態と対応づけて
格納し、これと同時に、CPU経過時間管理部12はC
PU経過時間のみを格納する。
When the CPU elapsed time is 40 seconds, there is an interrupt request from the peripheral function simulation section 242 to the CPU simulation section 11. When the processing proceeds as described above, the processing elapsed time and the CP that are the cumulative total of the actual processing time
The relationship with the elapsed U time is shown in FIG. First, the CPU simulation unit 11 repeats the instruction execution simulation until the actual processing elapsed time reaches 10 seconds (Sc
3 to Sc7), the history information management unit 13 performs CP for each instruction execution simulation of the CPU simulation unit 11.
The CPU elapsed time is retrieved from the U elapsed time management unit 12,
The data is stored in association with the internal state of the CPU simulation unit 11, and at the same time, the CPU elapsed time management unit 12 stores C
Only the PU elapsed time is stored.

【0075】周辺機能シミュレーション部241および
242は、CPUシミュレーション部11からの処理要
求待ち状態である(Ss1)。また、入出力順序制御部
28は、CPUシミュレーション部11からの処理要求
発生通知または周辺機能シミュレーション部からの割込
み要求発生通知待ちまたは周辺機能終了通知待ち状態で
ある。
The peripheral function simulation units 241 and 242 are in a state of waiting for a processing request from the CPU simulation unit 11 (Ss1). The input / output sequence control unit 28 is in a state of waiting for a processing request generation notification from the CPU simulation unit 11 or an interrupt request generation notification or peripheral function end notification from the peripheral function simulation unit.

【0076】状態復元部16は、戻り先CPU経過時間
が入力されるのを待っている状態である(Sr1)。処
理経過時間が10秒のとき、CPUシミュレーション部
11は、周辺シミュレーション部241に処理要求を行
ない(Sc5)、入出力順序制御部28に処理要求発生
を通知する(Sc6)。通知を行なった後は、CPU
は、Sc8以降の処理を行なう。
The state restoration unit 16 is in a state of waiting for the return destination CPU elapsed time to be input (Sr1). When the processing elapsed time is 10 seconds, the CPU simulation unit 11 makes a processing request to the peripheral simulation unit 241 (Sc5), and notifies the input / output sequence control unit 28 of the processing request generation (Sc6). After notification, CPU
Performs processing after Sc8.

【0077】処理要求を受けた周辺機能シミュレーショ
ン部241は(Ss1)、周辺機能のシミュレーション
を開始する(Ss2)。入出力順序制御部28は処理要
求の発生通知を受けると(Si11)、CPU経過時間
管理部12から処理要求時CPU経過時間「10秒」を
取りだす。次に、処理要求を受けた周辺シミュレーショ
ン部241の識別子I1 を確認し、同じ識別子を有する
周辺機能経過時間管理部251から周辺機能経過時間
「0秒」を取りだす(ここでは、最初に処理要求が出さ
れた時点を0秒とすることにする。)さらに入力出力順
序制御部28は、取り出されたCPU経過時間「10
秒」と周辺機能経過時間「0秒」と、識別子I1 とを対
応づけて周辺処理情報として周辺処理情報格納部27に
出力する(Si12)。周辺処理情報格納部27は入出
力順序制御手段から出力された周辺処理情報を格納す
る。
The peripheral function simulation section 241 having received the processing request (Ss1) starts the simulation of the peripheral function (Ss2). When the input / output sequence control unit 28 receives the processing request generation notification (Si11), it fetches the processing request CPU elapsed time “10 seconds” from the CPU elapsed time management unit 12. Next, the identifier I 1 of the peripheral simulation unit 241 which has received the processing request is confirmed, and the peripheral function elapsed time “0 seconds” is taken out from the peripheral function elapsed time management unit 251 having the same identifier (here, the processing request is made first). Is set to 0 second.) Further, the input / output sequence control unit 28 causes the CPU elapsed time “10” to be taken out.
A second "and peripheral functions elapsed time" 0 seconds "into the peripheral processing information storing section 27 and the identifier I 1 as a peripheral processing information in association with (Si12). The peripheral processing information storage unit 27 stores the peripheral processing information output from the input / output sequence control means.

【0078】実際の処理経過時間が10秒から20秒の
間のときは、CPUシミュレーション部11と、CPU
経過時間管理部12と、履歴情報管理部13と、周辺機
能シミュレーション部242と、状態復元部16とは、
処理経過時間が10秒までのときと同じ動作をする。ま
た、周辺機能シミュレーション部241は、CPUシミ
ュレーション部11からの要求に対する周辺機能のシミ
ュレーションを実行する(Ss2、Ss3、Ss6を繰
り返す)。
When the actual elapsed processing time is between 10 and 20 seconds, the CPU simulation unit 11 and the CPU
The elapsed time management unit 12, the history information management unit 13, the peripheral function simulation unit 242, and the state restoration unit 16
The same operation as when the processing elapsed time is up to 10 seconds is performed. In addition, the peripheral function simulation unit 241 executes the simulation of the peripheral function in response to the request from the CPU simulation unit 11 (Ss2, Ss3, and Ss6 are repeated).

【0079】また、入出力順序制御手段28はSi13
以降の処理を行なうが、この時点ではどの周辺機能シミ
ュレータの割り込みや処理終了は起こらないので、Si
13、Si18、Si20、Si22は何れもNoとな
る。実際の処理経過時間が20秒のとき、CPUシミュ
レーション部11は、周辺シミュレーション部242に
処理要求を行ない(Sc5)、入出力順序制御部28に
処理要求が発生したこと通知する(Sc6)。
Further, the input / output sequence control means 28 uses Si13.
Subsequent processing is performed, but at this point, no peripheral function simulator interrupts or processing termination occurs, so Si
13, 13, Si 18, Si 20, and Si 22 are all No. When the actual processing elapsed time is 20 seconds, the CPU simulation unit 11 makes a processing request to the peripheral simulation unit 242 (Sc5), and notifies the input / output sequence control unit 28 that a processing request has occurred (Sc6).

【0080】CPUシミュレーション部11からの処理
要求を受けると(Ss1)、周辺機能シミュレーション
部242は、周辺機能のシミュレーションを開始する
(Ss2)。また、入出力順序制御部28は処理経過時
間が10秒のときと同様にして、識別子「I2 」と処理
要求時CPU経過時間「20秒」と周辺機能経過時間
「0秒」を対応づけて周辺処理情報格納部27に格納し
(Si12)する。
When receiving the processing request from the CPU simulation section 11 (Ss1), the peripheral function simulation section 242 starts the simulation of the peripheral function (Ss2). Further, the input / output sequence control unit 28 associates the identifier “I 2 ”, the processing request CPU elapsed time “20 seconds”, and the peripheral function elapsed time “0 seconds” in the same manner as when the processing elapsed time is 10 seconds. And stores it in the peripheral processing information storage unit 27 (Si12).

【0081】実際の処理経過時間が20秒から50秒の
間のときは、CPUシミュレーション部11とCPU経
過時間管理部12と履歴情報管理部13と、状態復元部
16とは、処理経過時間が10秒までのときと同じ動作
をする。周辺機能シミュレーション部241および24
2は周辺機能のシミュレーションを実行する(Ss2、
Ss3、Ss6を繰り返す)。
When the actual processing elapsed time is between 20 seconds and 50 seconds, the CPU simulation unit 11, the CPU elapsed time management unit 12, the history information management unit 13, and the state restoration unit 16 determine the processing elapsed time. Performs the same operation as up to 10 seconds. Peripheral function simulation units 241 and 24
2 executes the simulation of peripheral functions (Ss2,
Repeat Ss3 and Ss6).

【0082】また、入出力順序制御手段28はSi13
以降の処理を行なう。実際の処理経過時間が50秒のと
き、周辺機能シミュレーション部242は、入出力順序
制御部28に割込み要求発生を通知を行ない(Ss
4)、CPUシミュレーション部11に割込み要求を行
なう(Ss5)。入出力順序制御部28は割り込み処理
要求発生の通知を受けると(Si13)、割り込み要求
を発生した周辺機能シミュレーション部242の識別子
を確認し、この識別子I2 と同じ識別しを有する周辺機
能経過時間管理部252から割り込み要求が発生した時
点の周辺機能経過時間を取りだす。この場合、周辺機能
経過時間「20秒」が取り出される。 さらに、周辺処
理情報格納部27から識別子I2 と対応付けて格納され
ている周辺処理情報のCPU経過時間「20秒」と周辺
機能経過時間「0秒」を取りだし、実施例1の戻り先C
PU経過時間を算出する際と同等に、20−0+20=
40秒として戻り先CPU経過時間を算出する(Si1
4)。周辺処理情報格納部27の格納内容を参照し、こ
のように算出された戻り先CPU経過時間より新しい処
理要求時CPU経過時間が有るかどうか検索する(Si
15)。この場合は、一番新しい処理要求時CPU経過
時間が20秒であり、40秒より古いので、削除するも
のはないと判断する。
Further, the input / output sequence control means 28 uses Si13.
Perform the following processing. When the actual elapsed processing time is 50 seconds, the peripheral function simulation section 242 notifies the input / output sequence control section 28 that an interrupt request has been generated (Ss).
4) An interrupt request is sent to the CPU simulation section 11 (Ss5). When output order control unit 28 receives the notification of the interrupt processing request occurs (Si13), check the identifier of the peripheral function simulation unit 242 an interrupt request has occurred, the peripheral function the elapsed time with the same identification as the identifier I 2 The peripheral function elapsed time at the time when the interrupt request is generated from the management unit 252 is taken out. In this case, the peripheral function elapsed time “20 seconds” is extracted. Further, the CPU elapsed time “20 seconds” and the peripheral function elapsed time “0 seconds” of the peripheral processing information stored in association with the identifier I 2 are retrieved from the peripheral processing information storage unit 27, and the return destination C of the first embodiment is returned.
20-0 + 20 = equivalently when calculating the PU elapsed time
The elapsed CPU time at the return destination is calculated as 40 seconds (Si1
4). By referring to the contents stored in the peripheral processing information storage unit 27, it is searched whether or not there is a CPU elapsed time at the time of a process request that is newer than the return destination CPU elapsed time thus calculated (Si.
15). In this case, the CPU elapsed time at the latest processing request is 20 seconds, which is older than 40 seconds, so it is determined that there is nothing to delete.

【0083】次に、算出した戻り先CPU経過時間を状
態復元部に出力する(Si17)。状態復元部16は戻
り先CPU経過時間が入力されると(Sr1)、履歴情
報管理部13の格納内容を参照し、格納されている履歴
情報のうちCPU経過時間が「40秒」に等しいあるい
は「40秒」より大きくかつ「40秒」に最も近いとい
う条件をみたす履歴情報Hを検索し(Sr2)、CPU
シミュレーション部11を履歴情報Hの内部状態と同じ
状態にしCPU経過時間管理部12のCPU経過時間を
「40秒」に更新する(Sr3)。このように、内部状
態が戻され、CPU経過時間が更新されると、割り込み
処理を行なう(Sc2)。
Next, the calculated return destination CPU elapsed time is output to the state restoration unit (Si17). When the return destination CPU elapsed time is input (Sr1), the state restoration unit 16 refers to the stored content of the history information management unit 13 and the CPU elapsed time in the stored history information is equal to "40 seconds" or The history information H satisfying the condition that it is larger than “40 seconds” and closest to “40 seconds” is searched (Sr2), and the CPU is searched.
The simulation unit 11 is set to the same state as the internal state of the history information H, and the CPU elapsed time of the CPU elapsed time management unit 12 is updated to “40 seconds” (Sr3). In this way, when the internal state is returned and the CPU elapsed time is updated, interrupt processing is performed (Sc2).

【0084】実際の経過時間が50秒から70秒の間
(この時CPUシミュレーション部11はは割り込み処
理を行なうために引き戻されているので、CPU経過時
間は30秒〜50秒の間となる)ときは、処理経過時間
が10秒から20秒の間のときと同じである。実際の処
理経過時間が70秒(CPU経過時間は50秒)のと
き、周辺機能シミュレーション部241は入出力順序制
御部28に割込み要求発生を通知し(Ss4)、CPU
シミュレーション部11に割込み要求を行なう(Ss
5)。
The actual elapsed time is between 50 seconds and 70 seconds (at this time, since the CPU simulation unit 11 is pulled back to perform the interrupt processing, the CPU elapsed time is between 30 seconds and 50 seconds). This is the same as when the processing elapsed time is between 10 and 20 seconds. When the actual processing elapsed time is 70 seconds (CPU elapsed time is 50 seconds), the peripheral function simulation unit 241 notifies the input / output sequence control unit 28 of the interrupt request generation (Ss4), and the CPU
An interrupt request is issued to the simulation unit 11 (Ss
5).

【0085】割り込み要求発生の通知を受けた入出力順
序制御部28は(Si3)、周辺機能シミュレーション
部241の識別子を確認し、この識別子I1 と同じ識別
子を有する周辺機能経過時間管理部251から割り込み
要求発生時点の周辺機能経過時間を取りだす。この場
合、周辺機能経過時間「20秒」が取り出される。さら
に、周辺処理情報格納部27から識別子I1 と対応付け
て格納されている周辺処理情報のCPU経過時間「10
秒」と周辺機能経過時間「0秒」を取りだし、上記と同
様に20−0+10=30秒として戻り先CPU経過時
間を算出する。Si15で削除する情報はないので、状
態復元部16に戻り先CPU経過時間「30秒」を出力
する(Si17)。
The input / output sequence control unit 28 that has received the notification of the interrupt request generation (Si3) confirms the identifier of the peripheral function simulation unit 241 and confirms from the peripheral function elapsed time management unit 251 having the same identifier as this identifier I 1. Fetch the peripheral function elapsed time at the time of an interrupt request. In this case, the peripheral function elapsed time “20 seconds” is extracted. Further, the CPU elapsed time “10” of the peripheral processing information stored in association with the identifier I 1 from the peripheral processing information storage unit 27.
Second ”and peripheral function elapsed time“ 0 second ”are taken out, and the return destination CPU elapsed time is calculated as 20−0 + 10 = 30 seconds in the same manner as above. Since there is no information to be deleted in Si15, the destination CPU elapsed time "30 seconds" is output to the state restoration unit 16 (Si17).

【0086】状態復元部16は実際の処理経過時間が5
0秒のときと同様の処理を行い、CPUシミュレーショ
ン部11の状態を復元し(Sr3)、CPU経過時間管
理部12のCPU経過時間を「30秒」に更新する。C
PUは、割り込み要求のあった処理を行なう。実際の処
理経過時間が70秒より大きくなった時点で、入出力順
序制御部が、Si22の処理情報の削除についての判断
を行なった場合、先ず、一番古い戻り先CPU経過時間
として、241の戻り先CPU経過時間30秒が検出さ
れる。現在のCPU経過時間は、30秒を経過している
ので、上記したの条件は満たしている。
The state restoration unit 16 determines that the actual processing elapsed time is 5
The same process as at 0 second is performed, the state of the CPU simulation unit 11 is restored (Sr3), and the CPU elapsed time of the CPU elapsed time management unit 12 is updated to "30 seconds". C
The PU performs the processing requested by the interrupt. When the input / output sequence control unit determines to delete the processing information of Si22 at the time when the actual processing elapsed time becomes larger than 70 seconds, first, the oldest return destination CPU elapsed time is set to 241. The return destination CPU elapsed time of 30 seconds is detected. Since the current CPU elapsed time has passed 30 seconds, the above conditions are satisfied.

【0087】さらに、本実施例では、周辺機能シミュレ
ータが2つなので、241とは識別子の異なる周辺機能
シミュレーション部の周辺処理情報として242の周辺
処理情報のみを考えればよく、周辺機能シミュレーショ
ン部242についての処理要求時CPU経過時間は「2
0秒」なので、「30秒」より古く、且つ、周辺機能シ
ミュレーション部242の戻り先CPU経過時間「40
秒」は格納されているので、上記したの条件も満たし
ている。
Further, in the present embodiment, since there are two peripheral function simulators, it is sufficient to consider only the peripheral processing information of 242 as the peripheral processing information of the peripheral function simulation section having a different identifier from 241. The CPU elapsed time when the processing request is "2
Since it is "0 second", it is older than "30 seconds", and the return destination CPU elapsed time of the peripheral function simulation unit 242 is "40".
Since "second" is stored, the above condition is also satisfied.

【0088】ここで、初めて、の条件が揃う場合が
発生したので、周辺機能シミュレータ部241について
の周辺処理情報は削除される(Si23)。処理経過時
間が70秒から80秒の間のときは処理経過時間が10
秒から20秒の間のときと同じである。実際の処理経過
時間が80秒のとき、CPU経過時間は40秒であり、
周辺処理情報格納部27に格納された情報を参照する
と、戻り先CPU経過時間が40秒である処理情報(周
辺シミュレーション部242からの処理要求)があるの
で、CPUシミュレーション部11に割込み要求、状態
復元部16に戻り先CPU経過時間を出力する(Si2
1)。CPUシミュレーション部11は、再度周辺機能
シミュレーション部242からの割り込み要求に対する
処理を行なう。
At this time, since the first condition is met, the peripheral processing information on the peripheral function simulator section 241 is deleted (Si23). When the elapsed processing time is between 70 and 80 seconds, the elapsed processing time is 10
It is the same as during the second to 20 seconds. When the actual processing elapsed time is 80 seconds, the CPU elapsed time is 40 seconds,
Referring to the information stored in the peripheral processing information storage unit 27, there is processing information (processing request from the peripheral simulation unit 242) whose return destination CPU elapsed time is 40 seconds. It returns to the restoration unit 16 and outputs the elapsed time of the destination CPU (Si2
1). The CPU simulation unit 11 again processes the interrupt request from the peripheral function simulation unit 242.

【0089】処理経過時間が80秒より大きくなった時
点で、入出力順序制御部28がSi22の判断を行なっ
た場合、先ず、一番古い戻り先CPU経過時間として、
242の割り込み時間である40秒が検出される。現在
のCPU経過時間は、40秒を経過しているので、上記
したの条件は満たしている。さらに、本実施例では、
周辺機能シミュレータが2つなので、241とは識別子
の異なる周辺機能シミュレーション部の周辺処理情報と
して241の周辺処理情報のみを考えればよい。この場
合、241の周辺処理情報は存在しないので、上記した
の条件も満たしている。従って、ステップSi22の
削除条件を満たすので、入出力順序制御部28は241
についての周辺処理情報を削除する(Si23)。
When the input / output sequence control unit 28 determines Si22 when the elapsed processing time exceeds 80 seconds, first, the oldest return destination CPU elapsed time is set as
The 242 interrupt time of 40 seconds is detected. Since the current CPU elapsed time has passed 40 seconds, the above condition is satisfied. Furthermore, in this embodiment,
Since there are two peripheral function simulators, it is sufficient to consider only the peripheral processing information of 241 as the peripheral processing information of the peripheral function simulation unit having an identifier different from that of 241. In this case, since the peripheral processing information 241 does not exist, the above condition is also satisfied. Therefore, since the deletion condition of step Si22 is satisfied, the input / output sequence control unit 28 determines 241
The peripheral processing information about is deleted (Si23).

【0090】処理経過時間が80秒以降は、処理経過時
間が10秒までのときと同じである。以上のようにして
シミュレーションは進行していく。上記実施例において
は、周辺機能シミュレーション部は、2つしか設けてい
ないが、3つ以上の場合も同様に行なうことができる。
また、履歴情報管理部は前記周辺処理情報格納部に前記
周辺処理情報が1個以上格納されている間だけ動作する
ように構成してもよい。
After the processing elapsed time of 80 seconds, it is the same as when the processing elapsed time is up to 10 seconds. The simulation proceeds as described above. In the above embodiment, only two peripheral function simulation units are provided, but the same can be done when there are three or more peripheral function simulation units.
Also, the history information management unit may be configured to operate only while one or more pieces of the peripheral processing information are stored in the peripheral processing information storage unit.

【0091】また、実施例1の場合と同様に、CPUシ
ミュレーション部11の代わりに周辺シミュレーション
部を用いたり、周辺シミュレーション部の代わりにCP
Uシミュレーション部11を用いたりしても良い。
Further, as in the case of the first embodiment, a peripheral simulation unit is used instead of the CPU simulation unit 11, or a CP is used instead of the peripheral simulation unit.
The U simulation unit 11 may be used.

【0092】[0092]

【発明の効果】このように本実施例によれば、CPUシ
ミュレーション部と周辺機能シミュレーション部は、通
常は並列にシミュレーションを実行し、周辺機能シミュ
レーション部からCPUシミュレーション部に割込み要
求が発生した場合のみCPUシミュレーション部の内部
状態を割込み要求発生時点に復元することで同期を実現
するので、割込み要求が発生しない場合は周辺機能シミ
ュレーション部の処理終了を待たずCPUシミュレーシ
ョン部は処理を続けることができるため、シミュレータ
全体の処理速度を向上することができるという効果を有
する。
As described above, according to the present embodiment, the CPU simulation unit and the peripheral function simulation unit normally execute the simulations in parallel, and only when the peripheral function simulation unit issues an interrupt request to the CPU simulation unit. Since the synchronization is realized by restoring the internal state of the CPU simulation unit to the time when the interrupt request occurs, the CPU simulation unit can continue the processing without waiting for the end of the processing of the peripheral function simulation unit when the interrupt request does not occur. The effect is that the processing speed of the simulator as a whole can be improved.

【0093】また、複数の周辺シミュレーション部を持
つシミュレータにおいても、割込み要求が発生した場合
のみ内部状態を割込み要求発生時点に復元することで同
期を実現するので、割込み要求が発生しない場合は周辺
機能シミュレーション部14の処理終了を待たずCPU
シミュレーション部11は処理を続けることができ、さ
らに割り込みを行なう順序も実機上で行なう場合と同様
に行なわれるという効果を奏する。
Further, even in a simulator having a plurality of peripheral simulation units, synchronization is realized by restoring the internal state to the interrupt request generation time only when an interrupt request occurs. CPU without waiting for the processing of the simulation unit 14 to end
The simulation unit 11 has the effect that the processing can be continued and that the order of interrupts is performed in the same manner as in the case of performing on the actual machine.

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

【図1】本発明の一例に係るシミュレータの構成図であ
る。
FIG. 1 is a configuration diagram of a simulator according to an example of the present invention.

【図2】本発明の一例にかかるCPUシミュレーション
部の処理動作のフローチャートである。
FIG. 2 is a flowchart of a processing operation of a CPU simulation unit according to an example of the present invention.

【図3】本発明の一例にかかる周辺機能シミュレーショ
ン部の処理動作のフローチャートである。
FIG. 3 is a flowchart of a processing operation of a peripheral function simulation unit according to an example of the present invention.

【図4】本発明の一例に係る入出力管理部の処理動作の
フローチャートである。
FIG. 4 is a flowchart of a processing operation of an input / output management unit according to an example of the present invention.

【図5】本発明の一例に係る状態復元部のフローチャー
トである。
FIG. 5 is a flowchart of a state restoration unit according to an example of the present invention.

【図6】本発明の一例に係るシミュレータの構成図であ
る。
FIG. 6 is a configuration diagram of a simulator according to an example of the present invention.

【図7】本発明の一例にかかる周辺機能シミュレーショ
ン部の処理動作のフローチャートである。
FIG. 7 is a flowchart of a processing operation of a peripheral function simulation section according to an example of the present invention.

【図8】本発明の一例にかかる入手力順序制御部の処理
動作のフローチャートである。
FIG. 8 is a flowchart of a processing operation of an acquisition power sequence control unit according to an example of the present invention.

【図9】本発明の実施例2において、処理要求、割り込
み要求のパターンを示す図である。
FIG. 9 is a diagram showing patterns of a processing request and an interrupt request in the second embodiment of the present invention.

【図10】本発明の実施例2において、処理要求、割り
込み要求のパターンを示す図である。
FIG. 10 is a diagram showing patterns of processing requests and interrupt requests in the second embodiment of the present invention.

【図11】本発明の実施例2における実際の処理経過時
間とCPU経過時間の対応を示す図である。
FIG. 11 is a diagram showing a correspondence between actual processing elapsed time and CPU elapsed time according to the second embodiment of the present invention.

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

11 CPUシミュレ−ション部 12 CPU経過時間管理部 13 履歴情報管理部 14 周辺機能シミュレーション部 15 周辺機能経過時間管理部 16 状態復元部 17 周辺処理情報格納部 18 入出力管理部 27 周辺処理情報格納部 28 入出力順序制御部 11 CPU Simulation Section 12 CPU Elapsed Time Management Section 13 History Information Management Section 14 Peripheral Function Simulation Section 15 Peripheral Function Elapsed Time Management Section 16 State Restoration Section 17 Peripheral Processing Information Storage Section 18 Input / Output Management Section 27 Peripheral Processing Information Storage Section 28 Input / output sequence control unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】CPUの命令実行をシミュレーションを行
なうCPUシミュレーション部と、 CPUの周辺装置のシミュレーションを行なう周辺機能
シミュレーション部と、 前記CPUシミュレーション部でシミュレーションした
命令を実機上で処理した場合に要する時間の累計である
CPU経過時間を格納するCPU経過時間管理部と、 前記CPUシミュレーション部の内部状態が変化するご
とに状態変化が始まる直前の時点のCPU経過時間を、
前記CPU経過時間管理部から取りだし、前記CPUシ
ミュレーション部の内部状態と対応づけて履歴情報とし
て管理する履歴情報管理部と、 前記周辺機能シミュレーション部でシミュレーションし
た処理を実機上で処理した場合に要する時間の累計であ
る周辺機能経過時間を格納する周辺機能経過時間管理部
と、 前記CPUシミュレーション部から、前記周辺機能シミ
ュレーション部に対して処理要求があった場合、前記C
PU経過時間管理部からCPU経過時間を取りだし、前
記周辺機能経過時間管理部から周辺機能経過時間を取り
だし、前記CPU経過時間と前記周辺機能経過時間を対
応づけて後述する周辺処理情報格納部に出力し、 前記周辺機能シミュレーション部から、前記CPUシミ
ュレーション部に割込み要求があった場合、前記周辺機
能経過時間管理部から割り込みが発生した時点の周辺機
能経過時間を取り出し、この割り込みが発生する基とな
った処理要求が発生した時点のCPU経過時間と周辺機
能経過時間とを取りだし、取り出されたそれぞれの経過
時間を項とする演算により、CPUシミュレーション部
がどの時点にもどって割り込みを行なうのか、割り込み
を行う時点のCPU経過時間を算出し、前記状態復元部
に対して算出された割り込みを行う時点のCPU経過時
間出力する入出力管理部と、 前記入出力管理部より出力された処理要求が発生した時
点のCPU経過時間と周辺機能経過時間とを対応づけた
周辺処理情報を格納する周辺処理情報格納部と、 前記入出力管理部により出力された割り込みを行なう時
点のCPU経過時間Tが入力されると、前記履歴情報管
理部の格納内容を参照し、格納されている履歴情報のう
ちCPU経過時間が入力されたCPU経過時間Tに等し
い、あるいは入力されたCPU経過時間Tより大きくか
つ入力されたCPU経過時間Tに最も近いという条件を
みたす履歴情報Hを前記履歴情報管理部から検索し、前
記CPUシミュレーション部を前記履歴情報Hの内部状
態と同じ状態にし、前記CPU経過時間管理部に格納さ
れているCPU経過時間を入力されたCPU経過時間T
に更新する状態復元部と、 を備えることを特徴とするシミュレータ。
1. A CPU simulation section for simulating instruction execution of a CPU, a peripheral function simulation section for simulating a peripheral device of the CPU, and a time required when an instruction simulated by the CPU simulation section is processed on an actual machine. And a CPU elapsed time management unit that stores a CPU elapsed time that is a cumulative total of the CPU elapsed time, and a CPU elapsed time immediately before the state change starts each time the internal state of the CPU simulation unit changes.
A history information management unit that takes out from the CPU elapsed time management unit and manages it as history information in association with the internal state of the CPU simulation unit, and the time required when the process simulated by the peripheral function simulation unit is processed on an actual machine. If there is a processing request from the peripheral function elapsed time management unit that stores the peripheral function elapsed time that is the cumulative total of the peripheral function elapsed time, and the CPU simulation unit, the C
The CPU elapsed time is retrieved from the PU elapsed time management unit, the peripheral function elapsed time is retrieved from the peripheral function elapsed time management unit, and the CPU elapsed time and the peripheral function elapsed time are associated and output to the peripheral processing information storage unit described later. However, when the peripheral function simulation unit makes an interrupt request to the CPU simulation unit, the peripheral function elapsed time at the time when the interrupt is generated is taken out from the peripheral function elapsed time management unit, and this is the basis for generating the interrupt. The CPU elapsed time and the peripheral function elapsed time at the time when the processing request is generated are taken out, and an interrupt is made to determine at what point the CPU simulation unit should return to the interrupt by the operation using each of the extracted elapsed times as a term. The CPU elapsed time at the time of execution is calculated, and the calculated time is calculated for the state restoration unit. I / O management unit that outputs the CPU elapsed time at the time of performing the plug-in, and peripheral processing information that correlates the CPU elapsed time and the peripheral function elapsed time when the processing request output from the I / O management unit occurs When the peripheral processing information storage unit to be executed and the CPU elapsed time T at the time of the interruption output by the input / output management unit are input, the stored history information is referred to by referring to the stored contents of the history information management unit. Of the history information management unit, history information H satisfying the condition that the CPU elapsed time is equal to the input CPU elapsed time T or is greater than the input CPU elapsed time T and is closest to the input CPU elapsed time T The CPU simulation unit is set to the same state as the internal state of the history information H, and the CPU elapsed time management unit stores the CPU CPU elapsed time T input the time
A state recovery unit for updating to, and a simulator.
【請求項2】上記周辺機能シミュレーション部が複数存
在し、各周辺機能シミュレーション部はそれぞれ異なる
識別子を有しており、 各周辺機能シミュレーション部に対応して、上記周辺機
能経過時間管理部が存在し、 上記周辺処理情報格納部は、周辺処理情報として、さら
に、周辺処理情報に関係する周辺機能シミュレーション
部の識別子と、割り込み処理を行なう時点のCPU経過
時間とを格納し、 上記入出力制御部が、周辺処理情報出力の際に処理要求
を受けた周辺機能シミュレーション部の識別子も出力
し、さらに、算出された割り込みを行なう時点のCPU
経過時間を、算出の際にとり出した周辺処理情報と対応
付けて周辺処理情報格納部に出力し、 さらに、上記シミュレータは、必要に応じて周辺処理情
報の削除を行う周辺処理情報管理部と、 CPUシミュレーション部のシミュレーションにおい
て、正しい順序で、割り込み処理が行なわれるように、
一度行なった割り込み処理をCPUシミュレーション部
に再度行なわせる割り込み再要求制御部と、 を有することを特徴とする請求項1記載のシミュレー
タ。
2. A plurality of peripheral function simulation units exist, each peripheral function simulation unit has a different identifier, and the peripheral function elapsed time management unit exists corresponding to each peripheral function simulation unit. The peripheral processing information storage section further stores, as the peripheral processing information, an identifier of a peripheral function simulation section related to the peripheral processing information and a CPU elapsed time at the time of executing the interrupt processing. , The CPU of the peripheral function simulation unit that has received the processing request when outputting the peripheral processing information, and the CPU at the time of executing the calculated interrupt
The elapsed time is output to the peripheral processing information storage unit in association with the peripheral processing information extracted at the time of calculation, and the simulator is a peripheral processing information management unit that deletes the peripheral processing information as necessary, In the simulation of the CPU simulation unit, interrupt processing is performed in the correct order.
The simulator according to claim 1, further comprising: an interrupt re-request control unit that causes the CPU simulation unit to perform the interrupt process once performed.
【請求項3】上記周辺処理情報管理部は、周辺機能シミ
ュレーション部のシミュレーションが終了した際に、周
辺処理情報格納部の格納内容を参照し、シミュレーショ
ンが終了した周辺機能シミュレーション部と同じ識別子
が格納されている周辺処理情報を検索し、当該周辺処理
情報に入出力管理部によって算出された割り込み処理を
行なう時点のCPU経過時間が格納されていないとき当
該周辺処理情報の削除を行い、 また、入出力管理部によって割り込み要求を行なう時点
のCPU経過時間が算出された際に、周辺処理情報格納
部の格納内容を参照し、算出されたCPU経過時間より
後にだされた処理要求に関する周辺処理情報がある場合
は、この周辺処理情報を削除し、 また、周辺処理情報格納部の格納内容を参照し、最も古
い割り込み処理を行なう時点のCPU経過時間Tを検索
し、当該CPU経過時間TがCPU経過時間管理部に管
理されている最も新しいCPU経過時間よりも古く、か
つ上記CPU経過時間Tが格納さえれている周辺処理情
報以外の周辺処理情報を参照した場合、処理要求が行な
われた時点のCPU経過時間が前記CPU経過時間Tよ
り古く、かつ、割り込みを処理を行なう時点のCPU経
過時間の値が格納されていない周辺処理情報が存在しな
い場合、上記CPU経過時間Tを含む周辺処理情報を削
除し、 上記、割り込み再発生制御部は、周辺処理情報格納部の
格納内容を参照し、割り込み処理を行なう時点のCPU
経過時間が現在のCPU経過時間管理部に管理されてい
るCPU経過時間と等しい周辺処理情報があるかどうか
検索し、有る場合は、CPUシミュレーション部が再度
割り込み処理を行なう、 ことを特徴とする請求項2記載のシミュレータ。
3. The peripheral processing information management section refers to the stored contents of the peripheral processing information storage section when the simulation of the peripheral function simulation section is completed, and stores the same identifier as the peripheral function simulation section for which the simulation is completed. If the CPU elapsed time at the time of performing the interrupt processing calculated by the input / output management unit is not stored in the peripheral processing information, the peripheral processing information is deleted. When the CPU elapsed time at the time of making an interrupt request is calculated by the output management unit, the contents stored in the peripheral processing information storage unit are referred to, and the peripheral processing information regarding the processing request issued after the calculated CPU elapsed time is displayed. If there is, delete this peripheral processing information, and also refer to the stored contents of the peripheral processing information storage section to determine the oldest allocation. Only the CPU elapsed time T at the time of performing the process is searched, the CPU elapsed time T is older than the newest CPU elapsed time managed by the CPU elapsed time management unit, and the CPU elapsed time T is stored. When the peripheral processing information other than the peripheral processing information is referred to, the CPU elapsed time at the time of the processing request is older than the CPU elapsed time T, and the value of the CPU elapsed time at the time of processing the interrupt is stored. If there is no unprocessed peripheral process information, the peripheral process information including the CPU elapsed time T is deleted, and the interrupt reoccurrence control unit refers to the stored contents of the peripheral process information storage unit to perform interrupt processing. CPU at the time
The CPU simulation unit performs interrupt processing again if there is peripheral processing information whose elapsed time is equal to the CPU elapsed time managed by the current CPU elapsed time management unit. The simulator according to Item 2.
【請求項4】履歴情報管理部は、前記CPUシミュレー
ション部から前記周辺機能シミュレーション部に対して
処理要求が発生した直後から前記周辺機能シミュレーシ
ョン部から前記CPUシミュレーション部に対して割込
み要求が発生するまでの間だけ動作することを特徴とす
る請求項1記載のシミュレータ。
4. A history information management unit from immediately after a processing request is issued from the CPU simulation unit to the peripheral function simulation unit until an interrupt request is issued from the peripheral function simulation unit to the CPU simulation unit. The simulator according to claim 1, which operates only during the period.
【請求項5】履歴情報管理部は前記周辺処理情報格納部
に前記周辺処理情報が1個以上格納されている間だけ動
作することを特徴とする請求項2記載のシミュレータ。
5. The simulator according to claim 2, wherein the history information management unit operates only while one or more pieces of the peripheral processing information are stored in the peripheral processing information storage unit.
【請求項6】上記状態復元部が、前記CPUシミュレー
ション部に割込み要求があった場合、前記履歴情報管理
部に格納されている履歴情報のうち内部状態が割込み許
可状態であり、且つCPU経過時間が前記経過時間Tに
等しいあるいは前記経過時間Tより大きくかつ前記経過
時間Tに最も近いという条件をみたす履歴情報Hを前記
履歴情報管理部から検索し前記CPUシミュレーション
部を前記履歴情報Hの内部状態と同じ状態にし、前記C
PU経過時間管理部に格納されているCPU経過時間を
前記経過時間Tに更新することを特徴とする請求項1、
請求項2記載のシミュレータ。
6. The state restoration unit, when an interrupt request is issued to the CPU simulation unit, the internal state of the history information stored in the history information management unit is the interrupt enabled state, and the CPU elapsed time Is equal to the elapsed time T or is greater than the elapsed time T and is closest to the elapsed time T, the history information management unit is searched for history information H, and the CPU simulation unit is set to the internal state of the history information H. To the same condition as above
The CPU elapsed time stored in the PU elapsed time management unit is updated to the elapsed time T.
The simulator according to claim 2.
JP5304136A 1993-12-03 1993-12-03 Simulator Pending JPH07160537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5304136A JPH07160537A (en) 1993-12-03 1993-12-03 Simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5304136A JPH07160537A (en) 1993-12-03 1993-12-03 Simulator

Publications (1)

Publication Number Publication Date
JPH07160537A true JPH07160537A (en) 1995-06-23

Family

ID=17929480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5304136A Pending JPH07160537A (en) 1993-12-03 1993-12-03 Simulator

Country Status (1)

Country Link
JP (1) JPH07160537A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6467078B1 (en) 1998-07-03 2002-10-15 Nec Corporation Program development system, method for developing programs and storage medium storing programs for development of programs
JP2005222420A (en) * 2004-02-06 2005-08-18 Toyota Motor Corp Distribution processing support program
JP2007048019A (en) * 2005-08-10 2007-02-22 Sony Computer Entertainment Inc Emulation method, emulator, computer embedded device, and program for emulator
JP2007334392A (en) * 2006-06-12 2007-12-27 Hitachi Ltd Method of emulating asynchronous processing
JP2009535746A (en) * 2006-05-03 2009-10-01 株式会社ソニー・コンピュータエンタテインメント Method and apparatus for solving clock management problems in emulation involving both interpreted and translated instructions
JP2012123726A (en) * 2010-12-10 2012-06-28 Mitsubishi Electric Corp Simulation device and simulation program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6467078B1 (en) 1998-07-03 2002-10-15 Nec Corporation Program development system, method for developing programs and storage medium storing programs for development of programs
JP2005222420A (en) * 2004-02-06 2005-08-18 Toyota Motor Corp Distribution processing support program
JP2007048019A (en) * 2005-08-10 2007-02-22 Sony Computer Entertainment Inc Emulation method, emulator, computer embedded device, and program for emulator
JP2009535746A (en) * 2006-05-03 2009-10-01 株式会社ソニー・コンピュータエンタテインメント Method and apparatus for solving clock management problems in emulation involving both interpreted and translated instructions
JP2007334392A (en) * 2006-06-12 2007-12-27 Hitachi Ltd Method of emulating asynchronous processing
JP2012123726A (en) * 2010-12-10 2012-06-28 Mitsubishi Electric Corp Simulation device and simulation program

Similar Documents

Publication Publication Date Title
US7555739B1 (en) Method and apparatus for maintaining synchronization between layout clones
JP3123025B2 (en) Cut and paste filter in data processing system
JP2550063B2 (en) Distributed processing system simulation method
CN108205560B (en) Data synchronization method and device
JP2011164704A (en) Client program, terminal, server device, system, and method
EP4209894A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
JP2000122785A (en) Www server and recording medium
JP2709705B2 (en) Program management method in multi-computer system
JPH07160537A (en) Simulator
CN102640150A (en) Automatic generation of a query lineage
CN111831744A (en) DAPP on-chain data retrieval system, method and medium
CN109117277B (en) Method and device for simulating synchronous blocking in asynchronous environment, storage medium, server and terminal
JP5414633B2 (en) Application execution apparatus and application execution method
JP7102783B2 (en) System management equipment, system management methods, and programs
CN113010758A (en) Association network knowledge graph visualization assembly and method
JP2606658B2 (en) Logic simulator and control method
JP2747164B2 (en) Software simulator
CN112473137B (en) Game object display method and device, storage medium and terminal equipment
CN112836907B (en) Processing method, device and system for incompatible job information
JP6949440B2 (en) Vector generator and vector generator program
JP2619487B2 (en) File operation method
KR960001081B1 (en) A simulation method for a real time database management
JPH08292884A (en) Repository device
JP2001060241A (en) Scheduling of non-integer simulation time for simulation of mixture signal
CN117251614A (en) Acquisition method, device, medium and electronic equipment of digital content on chain