JP2010128987A - Simulation method and system of the same - Google Patents
Simulation method and system of the same Download PDFInfo
- Publication number
- JP2010128987A JP2010128987A JP2008305625A JP2008305625A JP2010128987A JP 2010128987 A JP2010128987 A JP 2010128987A JP 2008305625 A JP2008305625 A JP 2008305625A JP 2008305625 A JP2008305625 A JP 2008305625A JP 2010128987 A JP2010128987 A JP 2010128987A
- Authority
- JP
- Japan
- Prior art keywords
- simulator
- simulation
- cpu
- change
- timer
- 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
Links
Images
Abstract
Description
本発明はシミュレーション方法及びそのシステムに関する。特に、ソフトウェアの動作を検証するために独立プロセスとして動作する複数のシミュレータを中間インタフェースを介して連携動作させ、1つのシステムとして動作させるシミュレーション方法及びそのシステに関するものである。 The present invention relates to a simulation method and a system thereof. In particular, the present invention relates to a simulation method and a system for causing a plurality of simulators operating as independent processes to verify the operation of software to operate in cooperation through an intermediate interface as a single system.
ソフトウェアは、そのソフトウエアが不正な動作を行っていないかテストをし、デバッグ作業を経てからリリースされる。ソフトウェア動作の検証方法として、ソフトウェアが動作するCPUとソフトウェアの制御対象装置とをコンピュータ上でシミュレートする方法がある。このようなシミュレーションを実行するシミュレートシステムは、制御対象装置の機能ごとに前記機能をシミュレートするシミュレータを有する。そして、各機能をシミュレートする複数のシミュレータを連携動作させて、1つのシミュレーションシステムとして動作させる。 The software is released after testing whether the software is performing an illegal operation and performing debugging. As a software operation verification method, there is a method of simulating on a computer a CPU on which software operates and a control target device of the software. A simulation system that executes such a simulation includes a simulator that simulates the function for each function of the control target device. Then, a plurality of simulators that simulate each function are operated in cooperation to operate as one simulation system.
下記の特許文献1では、前述したような複数のシミュレータを連携動作させて1つのシミュレーションシステムとして動作させる機器制御シミュレーションの例が示されている。この機器制御シミュレーションは、装置を制御する中央処理装置(CPU)のシミュレータ(以下、シミュレーションデバッガと呼ぶ)を有する。また、機器モデルのシミュレータ、その他、各種装置構成のシミュレータやシミュレーションを支援するシステムを受け持つシミュレータ(以下、まとめて単にシミュレータと呼ぶ)等によってシステムが構成される。そして、シミュレーション対象(CPUによるプログラム実行処理、仮想メカ部品の動作等)のシミュレーションにおいて、各々のプロセスに仮想時間をもつ場合の各プロセスの連携動作方法が例として示されている。
前記シミュレーションシステムのシミュレータ間での連携動作形態について模式図を図19に示す。図19のTsはシミュレーションシステム上の仮想時間での基準同期時間である。各シミュレータはTs時間の処理実行ごとに仮想時間を停止し、全てのシミュレータがTs時間で行う処理の実行を終了した後に、全シミュレータが一斉に次のTs時間の処理の実行を開始する。
シミュレーションの利用目的が装置を制御するCPUのソフトウェア(以下、単に装置制御ソフトウェアと呼ぶ)の検証である場合、シミュレーション上で重要になるのは次の情報である。すなわち、装置制御ソフトウェアのシミュレータに対する入力結果とソフトウェアシミュレータからの出力結果とである。ここで、装置制御ソフトウェアは、一般に、ソフトウェア自身で作り出しているタイマを利用して装置を制御する。従って、従来の各シミュレータ間の同期方法では、複数のシミュレータを連携動作させるプロセス接続部が作り出すシミュレーションシステムの仮想時間の切り替わりをトリガにして、シミュレータ間の同期タイミングが決定される。そのため、検証対象のソフトウェアが処理を行うための基準タイマ(以下、ソフトウェアタイマと記す)と同期タイミングとは無関係であり、以下に示す問題が発生する。 When the purpose of use of the simulation is verification of CPU software for controlling the apparatus (hereinafter simply referred to as apparatus control software), the following information is important in the simulation. That is, an input result to the simulator of the device control software and an output result from the software simulator. Here, the device control software generally controls the device using a timer created by the software itself. Therefore, in the conventional synchronization method between the simulators, the synchronization timing between the simulators is determined by using, as a trigger, the switching of the virtual time of the simulation system created by the process connection unit that operates the plurality of simulators in cooperation. For this reason, the reference timer (hereinafter referred to as software timer) for the verification target software to perform processing is irrelevant to the synchronization timing, and the following problems occur.
従来のシミュレーションシステムで発生する問題に関して、例を挙げて説明する。 An example of a problem that occurs in a conventional simulation system will be described.
例えば、装置制御ソフトウェアは、1ms毎に変化するソフトウェアタイマを基準に動作するものとする。また、制御対象の装置は、装置制御ソフトウェアが機構部品Aの駆動信号を出力してから500ms後に機構部品Bが動作し、機構部品Bの動作結果を装置制御ソフトウェアに対して出力するものとする。かかる装置制御ソフトウェアを、従来のシミュレーションシステムでシミュレーションする場合を例とする。なお、本例では、装置制御ソフトウェアのシミュレータ(以下、CPUシミュレータと記す)と、制御対象装置のシミュレータ(以下、機構部品シミュレータと記す)をそれぞれ連携動作させ、1つのシミュレーションシステムとする。 For example, it is assumed that the device control software operates based on a software timer that changes every 1 ms. In addition, the device to be controlled is assumed that the mechanical component B operates 500 ms after the device control software outputs the drive signal of the mechanical component A, and outputs the operation result of the mechanical component B to the device control software. . As an example, the apparatus control software is simulated by a conventional simulation system. In this example, the simulator of the device control software (hereinafter referred to as a CPU simulator) and the simulator of the device to be controlled (hereinafter referred to as a mechanism component simulator) are linked to each other to form one simulation system.
図20及び図21は、本例を従来のシミュレーションシステムでシミュレーションした場合の概念図である。図20及び図21には、検証対象ソフトウェアの振る舞いが全く同じであっても、検証対象ソフトウェアが制御するCPUのシミュレータに対するイベントがソフトウェアタイマを基準にして異なる時刻に伝達されることが示されている。 20 and 21 are conceptual diagrams when this example is simulated by a conventional simulation system. FIG. 20 and FIG. 21 show that even if the behavior of the verification target software is exactly the same, an event for the CPU simulator controlled by the verification target software is transmitted at different times based on the software timer. Yes.
図20と図21とでは、機構部品シミュレータの機構部品Bの動作結果の出力タイミングが、ソフトウェアタイマ値の切り替わり前であるか後であるかによって、CPUシミュレータに対するシミュレーション変化の伝達タイミングが異なっている。たとえば、図20のA,Bでは500msの前と後、図21のA,Bでは501msの前と後である。 In FIG. 20 and FIG. 21, the transmission timing of the simulation change to the CPU simulator differs depending on whether the output timing of the operation result of the mechanism component B of the mechanism component simulator is before or after the switching of the software timer value. . For example, A and B in FIG. 20 are before and after 500 ms, and A and B in FIG. 21 are before and after 501 ms.
また、図21では、CPUシミュレータが機構部品Aの駆動信号を出力した時、機構部品シミュレータの1同期分の処理が既に終了している。そのため、駆動信号出力による機構部品シミュレータのシミュレーション処理は、CPUシミュレータが駆動信号を出力した次の同期から開始されることになる(図21では、仮想時間2msから開始)。これも、CPUシミュレータに対するイベントの伝達タイミングのずれの原因である。 In FIG. 21, when the CPU simulator outputs a drive signal for the mechanical part A, the processing for one synchronization of the mechanical part simulator has already been completed. Therefore, the simulation process of the mechanical component simulator by the drive signal output starts from the next synchronization when the CPU simulator outputs the drive signal (in FIG. 21, it starts from the virtual time of 2 ms). This is also the cause of the difference in the transmission timing of events to the CPU simulator.
以上のように、従来のシミュレーションシステムでは、CPUシミュレータが機構部品Aの駆動信号を出力してから、CPUシミュレータに機構部品Bの動作結果が伝達されるまでのソフトウェアタイマ値は、499〜501msの間でばらついてしまう。例えば、図20の機構部品Bの動作結果の伝達はソフトウェアタイマ値では500ms、図21の機構部品Bの動作結果の伝達はソフトウェアタイマ値では501msである。従って、シミュレーションシステムの仮想時間のタイミングで各シミュレータの同期をとる連携動作方法では、高精度なシミュレーションを行うことができない。 As described above, in the conventional simulation system, the software timer value from when the CPU simulator outputs the driving signal of the mechanism component A to when the operation result of the mechanism component B is transmitted to the CPU simulator is 499 to 501 ms. It will vary between. For example, the transmission of the operation result of the mechanical component B in FIG. 20 is 500 ms in terms of the software timer value, and the transmission of the operation result of the mechanical component B in FIG. 21 is 501 ms in terms of the software timer value. Therefore, a highly accurate simulation cannot be performed by the cooperative operation method in which the simulators are synchronized at the virtual time timing of the simulation system.
ここで、シミュレーション精度の確保のため、各シミュレータの同期時間間隔を短くすることが考えられる。しかしながら、同期間隔を短くすればするほど、各シミュレータが行うシミュレーション処理に対して、同期を取るために前記プロセス接続部が行う処理の割合が大きくなる。そのため、仮想時間の単位時間当たりに行う同期処理のオーバーヘッドが増加し、シミュレーション実行に要する時間も増加してしまう。 Here, in order to ensure the simulation accuracy, it is conceivable to shorten the synchronization time interval of each simulator. However, the shorter the synchronization interval, the greater the proportion of processing performed by the process connection unit for synchronization with the simulation processing performed by each simulator. For this reason, the overhead of synchronization processing performed per unit time of virtual time increases, and the time required for simulation execution also increases.
以上のように、従来のシミュレーションシステムの同期方法では、シミュレーションの実行効率を低下させずにシミュレーション精度を確保することができないという問題が挙げられる。 As described above, in the conventional simulation system synchronization method, there is a problem that the simulation accuracy cannot be ensured without reducing the execution efficiency of the simulation.
そこで、本発明は、複数のシミュレータが連携して動作するシミュレーションシステムにおいて、ソフトウェアの検証のためにシミュレーションを利用する場合、ソフトウェア自身で作り出しているタイマの変化をトリガとする。これにより、シミュレータ間の同期処理にソフトウェアタイマの変化を利用して各シミュレータを連携動作させることで、シミュレーション効率を低下させることなくシミュレーション精度を確保する。 Therefore, according to the present invention, when a simulation is used for software verification in a simulation system in which a plurality of simulators operate in cooperation, a change in a timer created by the software itself is used as a trigger. Thereby, the simulation accuracy is ensured without degrading the simulation efficiency by causing the simulators to cooperate with each other by using the change of the software timer for the synchronization processing between the simulators.
この課題を解決するために、本発明のシミュレーション方法は、CPUをシミュレートするCPUシミュレータと、該CPUの制御対象となる周辺部をシミュレートする少なくとも1つの周辺シミュレータと、各シミュレータの間での同期を実現するためのプロセス接続部とを使って、前記CPUシミュレータと少なくとも1つの周辺シミュレータとを同期させながらシミュレーションを実行するであって、前記CPUシミュレータが、前記CPUシミュレータが有するソフトウェアタイマの変化が発生すると、変化の発生を前記プロセス接続部に通知する工程と、前記CPUシミュレータが、前記変化の発生を通知した後に、次ぎの前記CPUシミュレータへのシミュレーションの開始の指示が前記プロセス接続部からあるまでシミュレーションを停止する工程と、前記プロセス接続部が、前記CPUシミュレータから前記ソフトウェアタイマの変化の発生の通知を受けて、前記ソフトウェアタイマの変化の発生を前記周辺シミュレータに通知する工程と、前記周辺シミュレータが、前記プロセス接続部から前記CPUシミュレータのソフトウェアタイマの変化の発生を受信する工程と、前記周辺シミュレータが、前記ソフトウェアタイマの変化の発生の受信後に、前記周辺シミュレータが前記ソフトウェアタイマの変化の時間に相当するシミュレーションを終了すると、該シミュレーションの終了を前記プロセス接続部に通知する工程と、前記プロセス接続部が、前記周辺シミュレータの全てからシミュレーションの終了が通知されると、前記CPUシミュレータ及び前記周辺シミュレータにシミュレーションの開始を指示する工程とを有することを特徴とする。 In order to solve this problem, a simulation method of the present invention includes a CPU simulator for simulating a CPU, at least one peripheral simulator for simulating a peripheral part to be controlled by the CPU, and each simulator. A simulation is performed while synchronizing the CPU simulator and at least one peripheral simulator using a process connection unit for realizing synchronization, and the CPU simulator changes a software timer included in the CPU simulator. When the occurrence of the change occurs, the process connection unit is notified of the occurrence of the change, and after the CPU simulator notifies the occurrence of the change, an instruction to start the next simulation to the CPU simulator is sent from the process connection unit. Simulate until The process connection unit receives a notification of the occurrence of the change of the software timer from the CPU simulator, and notifies the peripheral simulator of the occurrence of the change of the software timer, and the peripheral A step of receiving the occurrence of a change in the software timer of the CPU simulator from the process connection unit; and the peripheral simulator is configured to receive a change in the software timer after receiving the occurrence of the change in the software timer. When the simulation corresponding to time is completed, the process connection unit is notified of the end of the simulation, and when the process connection unit is notified of the end of the simulation from all of the peripheral simulators, the CPU simulator and the Around Characterized in that a step of instructing the start of simulation simulator.
また、本発明のシミュレーションシステムは、CPUをシミュレートするCPUシミュレータと、該CPUの制御対象となる周辺部をシミュレートする少なくとも1つの周辺シミュレータと、各シミュレータの間での同期を実現するためのプロセス接続部とを有し、前記CPUシミュレータと少なくとも1つの周辺シミュレータとを同期させながらシミュレーションを実行するシミュレーションシステムであって、前記CPUシミュレータが、前記CPUシミュレータが有するソフトウェアタイマの変化が発生すると、変化の発生を前記プロセス接続部に通知する手段と、前記変化の発生を通知した後に、次ぎの前記CPUシミュレータへのシミュレーションの開始の指示が前記プロセス接続部からあるまでシミュレーションを停止する手段とを有し、前記周辺シミュレータが、前記プロセス接続部から前記CPUシミュレータのソフトウェアタイマの変化の発生を受信する手段と、前記ソフトウェアタイマの変化の発生の受信後に、前記周辺シミュレータが前記ソフトウェアタイマの変化の時間に相当するシミュレーションを終了すると、該シミュレーションの終了を前記プロセス接続部に通知する手段とを有し、前記プロセス接続部が、前記CPUシミュレータから前記ソフトウェアタイマの変化の発生の通知を受けて、前記ソフトウェアタイマの変化の発生を前記周辺シミュレータに通知する手段と、前記周辺シミュレータの全てからシミュレーションの終了が通知されると、前記CPUシミュレータ及び前記周辺シミュレータにシミュレーションの開始を指示する手段とを有することを特徴とする。 Further, the simulation system of the present invention provides a CPU simulator for simulating a CPU, at least one peripheral simulator for simulating a peripheral part to be controlled by the CPU, and synchronization between the simulators. A simulation system that executes a simulation while synchronizing the CPU simulator and at least one peripheral simulator, and the CPU simulator causes a change in a software timer of the CPU simulator, Means for notifying the process connection unit of the occurrence of a change, and means for stopping the simulation until the next instruction to start the simulation is sent from the process connection unit to the CPU simulator after notifying the occurrence of the change Means for receiving the occurrence of a change in the software timer of the CPU simulator from the process connection unit, and after receiving the occurrence of the change in the software timer, the peripheral simulator changes the software timer. And a means for notifying the end of the simulation to the process connection unit, and the process connection unit is notified of the occurrence of a change in the software timer from the CPU simulator. Means for notifying the peripheral simulator of the occurrence of a change in the software timer, and means for instructing the CPU simulator and the peripheral simulator to start the simulation when the end of the simulation is notified from all of the peripheral simulators. Characterized in that it.
また、本発明のシミュレーションシステムは、機械装置の動作をコンピュータシステムでシミュレーションし、当該シミュレーションの対象となる装置に搭載されるCPUの制御プログラムに従って、前記対象装置のCPUの端子に対応して定義された仮想入力端子の情報を読み込み、当該仮想出力端子を制御することにより前記対象装置のCPUの動作をシミュレーションする1つ以上のCPUシミュレータと、アクチュエータとセンサを含む複数の部品からなる機械装置の機構モデルと、当該機構モデルの間の干渉及び連携と、前記アクチュエータとセンサに接続される信号とをコンピュータシステムで定義し、外部から入力されたアクチュエータ動作信号として定義された情報に対応したアクチュエータの動作と機構部品間の干渉及び連携の定義に従って、関連する全ての機構部品の動作をコンピュータシステムの表示装置に画像として再現するとともに、前記機構モデルの動作の結果を、前記センサとして定義された機構モデルに対するあらかじめ定義された動作に応じてセンサ信号として定義された情報を外部に出力する1つ以上の機構部品シミュレータと、前記シミュレーションの対象装置の構成物で、前記CPUシミュレータ及び前記機構部品シミュレータで対応していない構成物の動作と、前記対象装置に対する外部からの働きかけを擬似的に再現する機能と、シミュレーションの結果の解析、表示及び保存する機能と、シミュレーションのためのユーザインタフェースをする機能とを備えた1つ以上のシミュレータと、前記シミュレーションにおけるシミュレータを接続して、1つの機器制御シミュレーションシステムとして動作させるプロセス接続手段とを含み、前記プロセス接続手段は、検証対象のCPUのプログラムが自身で作り出しているタイマの変化をトリガとしてシミュレータ間の連携を行い、前記タイマの変化を1単位として仮想時刻を進め、該仮想時刻により前記各種のシミュレータ間の同期処理を行う連携動作モジュールを有することを特徴とする。 Further, the simulation system of the present invention simulates the operation of the mechanical device by a computer system, and is defined corresponding to the CPU terminal of the target device according to the CPU control program installed in the target device of the simulation. One or more CPU simulators that read information on the virtual input terminal and control the virtual output terminal to simulate the operation of the CPU of the target device, and a mechanism of a mechanical device including a plurality of parts including an actuator and a sensor Actuation of the actuator corresponding to the information defined as the actuator operation signal input from the outside, with the computer system defining the model, the interference and cooperation between the mechanism model and the signal connected to the actuator and the sensor And interference between mechanical parts and In accordance with the definition of the mobile phone, the operation of all related mechanism parts is reproduced as an image on the display device of the computer system, and the result of the operation of the mechanism model is converted into a predefined operation for the mechanism model defined as the sensor. In response to one or more mechanical component simulators that output information defined as sensor signals to the outside and the components of the simulation target device, operations of the components not supported by the CPU simulator and the mechanical component simulator And one or more simulators having a function of pseudo-reproducing an external action on the target device, a function of analyzing, displaying and saving a simulation result, and a function of a user interface for the simulation And the simulation in the simulation And a process connection unit that operates as a single device control simulation system. The process connection unit is configured to cooperate between simulators using a timer change generated by the CPU program to be verified as a trigger. And having a cooperative operation module for advancing virtual time with the change of the timer as one unit and performing synchronization processing between the various simulators based on the virtual time.
本発明によれば、検証対象ソフトウェアが処理を実行する仮想時間であるソフトウェアタイマを基準にシミュレーションシステムの仮想時刻を管理して、複数のシミュレータの仮想時刻を一致させることができる。そのため、むやみに同期間隔を小さくすることなく、シミュレーションシステム実行環境の資源を有効に使用でき、シミュレーション効率を低下させることなくシミュレーション精度を確保することができる。 According to the present invention, the virtual time of the simulation system can be managed based on the software timer, which is the virtual time when the verification target software executes processing, and the virtual times of a plurality of simulators can be matched. Therefore, the resources of the simulation system execution environment can be effectively used without unnecessarily reducing the synchronization interval, and the simulation accuracy can be ensured without reducing the simulation efficiency.
また、本発明によれば、シミュレーションの実行途中で検証対象ソフトウェアが処理を行う際に使用するソフトウェアタイマが変更になる場合でも、シミュレータ間を連携動作させるトリガとなるソフトウェアタイマを切替えることができる。そのため、シミュレーション効率を低下させることなくシミュレーション精度を確保することができる。 In addition, according to the present invention, even when the software timer used when the verification target software performs processing during the execution of the simulation is changed, it is possible to switch the software timer serving as a trigger for cooperative operation between simulators. Therefore, simulation accuracy can be ensured without reducing the simulation efficiency.
また、本発明によれば、複数の処理をそれぞれ異なる時間基準に基づいて実行するソフトウェアを検証する場合でも、シミュレーション精度を確保することができる。 Further, according to the present invention, simulation accuracy can be ensured even when software that executes a plurality of processes based on different time criteria is verified.
以下、本発明のシミュレーションシステムの構成と動作を、添付図面に従って詳細に説明する。 Hereinafter, the configuration and operation of the simulation system of the present invention will be described in detail with reference to the accompanying drawings.
[実施形態1]
本発明の実施形態1は、個々が独立プロセスとして動作する複数シミュレータを接続して1つのシステムとして動作させる機器制御シミュレーションシステムである。かかるシステムにおいて、機器を制御するソフトウェアの検証を目的とした機器制御シミュレーションを実行する際、検証対象のソフトウェア自身が作り出しているタイマ(以下、ソフトウェアタイマと記す)の変化をトリガにする。これにより、複数シミュレータ間の仮想時刻を一致させて複数シミュレータを同期させるものである。なお、実施形態1に係るシミュレーションシステムの機器制御シミュレーションは、コンピュータシステムで実行されるプログラムとして実現されるものである。
[Embodiment 1]
<本実施形態のシミュレーションを実現するコンピュータシステムの構成例>
図2は、本実施形態に係るシミュレーションを実現するコンピュータシステムの概略構成例を示す図である。なお、このコンピュータシステムにより実施形態1及び実施形態2のシミュレーションが実現される。
<Configuration Example of Computer System for Realizing Simulation of this Embodiment>
FIG. 2 is a diagram illustrating a schematic configuration example of a computer system that realizes the simulation according to the present embodiment. Note that the simulation of the first and second embodiments is realized by this computer system.
コンピュータシステム501は、中央処理装置502a(以下、CPUと呼ぶ)、主記憶装置502b(以下RAMと呼ぶ)、ハードディスク502c等を内蔵した本体部502を備える。また、本体部502から指示により画面表示を行う表示装置503を備える。また、この本体部502にユーザの指示や文字情報を入力するためのキーボード504と、表示装置503上の任意の位置を指定することによりその位置に表示されていたアイコン等に応じた指示を入力するマウス505とを備えている。
The
ハードディスク502cには、機器制御シミュレーションにおける各機能を実現するプログラムと、シミュレーションの対象となる機器情報を含むシミュレーションのための各種データとが格納される。シミュレーションに際しては、前記プログラム及び各種データをRAM502bにロードし、CPU502aによってプログラムが実行されて、各機器制御がシミュレーションされる。
The
これらコンピュータシステム501の基本動作は、基本プログラムであるオペレーティングシステム(以下、OSと記す)を介して実行される。以下、本実施形態では、コンピュータシステム501のOSをMicrosoft社の OS(登録商標)の例で説明する。しかし、本発明は OS上のシステムに限定されるものではない。
These basic operations of the
<実施形態1のシミュレーションシステムの機能構成例>
図1は、実施形態1に係るシミュレーションシステムの機能構成例を示す図である。
<Functional Configuration Example of Simulation System of
FIG. 1 is a diagram illustrating a functional configuration example of a simulation system according to the first embodiment.
図1に示すように、このシミュレーションシステムは、システムを構成する3つのシミュレータであるCPUシミュレータ101と、機構部品シミュレータ102と、汎用動作シミュレータ103とを備える。また、これらのシミュレータを管理するプロセス接続部であるシミュレータハブ(以下、HUBと記す)104を備えて構成される。CPUシミュレータ101、機構部品シミュレータ102、汎用動作シミュレータ103は、それぞれがOS上で個別に動作するシミュレータであり、それぞれが独立したプロセスとして存在する。
As shown in FIG. 1, the simulation system includes a
次に、各構成要素の機能について説明する。 Next, the function of each component will be described.
(CPUシミュレータ101)
CPUシミュレータ101は、シミュレーション対象となるCPU(以下、ターゲットCPUと呼ぶ)の動作をコンピュータシステム501上で実現する機能である。ここで、ターゲットCPUとは、コンピュータシステム501に搭載されているCPU502aではなく、シミュレーションの対象となる装置に搭載され、該装置を制御するためのCPUのことである。
(CPU simulator 101)
The
CPUシミュレータ101は、ターゲットCPUの制御プログラム(以下、ターゲットファームウェアと呼ぶ)に従って、ターゲットCPUの端子に対応して定義された仮想入力端子の情報を読み込み、仮想出力端子を制御する。
The
また、CPUシミュレータ101は、ターゲットCPUのアドレス空間に対応した仮想アドレス空間を用意している。ここで、仮想アドレス空間とは、ターゲットCPUの管理するアドレス空間上の個々の領域と1対1で対応する領域をコンピュータシステム501のRAM502b上に定義したものである。仮想アドレス空間のコンピュータシステム501上の実アドレス値は、ターゲットCPUの扱うアドレス値とは異なる。そして、CPUシミュレータ101は、ターゲットファームウェアによるターゲットCPUのアドレス空間上のアドレス値へのアクセス命令に従って、仮想アドレス空間上の対応する領域にアクセスする。また、ターゲットCPUのレジスタ類も、前記仮想アドレス空間上に対応する領域が設定され、レジスタ類へのアクセスも仮想アドレス空間へのアクセスによってシミュレーションされる。
The
コンピュータシステム501上でのターゲットファームウェアの処理のシミュレーション方法としては、次ぎの2つがある。1つは、ターゲットファームウェアのソースプログラムをコンピュータシステム501のネイティブ言語に変換して実行する方式である。もう1つは、ターゲットCPUの実行命令を1語ずつ解釈し、コンピュータシステム501のCPUに対応した実行命令に翻訳しながら実行する方式である。本実施形態は、何れのCPUシミュレーション方式にも対応する。
There are the following two methods for simulating the processing of the target firmware on the
CPUシミュレータ101は、自身のシミュレータのイベント発生毎に、HUB104に自身のイベント発生を通知する。CPUシミュレータ101がイベント発生を通知する例としては、ターゲットCPUの動作シミュレーション上のイベント(メモリアクセスや割り込み発生等)がある。また、CPUシミュレータ101は、イベント発生時点で、HUB104にイベント発生を通知するのと同時に、シミュレーション処理の実行を一時停止させる。そして、HUB104から再びシミュレーション処理の実行を指示されるまで停止し、再び指示があるとシミュレーション処理を再開する。
The
(機構部品シミュレータ102)
機構部品シミュレータ102は、アクチュエータやセンサを含む複数の部品からなる機械装置の機構部品、当該機構部品間の干渉や連携、前記アクチュエータやセンサに接続される信号を、前記コンピュータ上でシミュレーションする。そして、シミュレーション結果を表示装置503上に表示する。
(Mechanical component simulator 102)
The
各機構部品には、ユーザにより形状、種類、動作、機構部品間の干渉や連携条件等の、機構部品のシミュレーションに関する情報が定義される。更に、センサやアクチュエータについては外部信号の定義が行われる。これら機構部品の定義は、CAD図面からの自動設定、専用の機構部品作成ソフトウェアをユーザが操作して設定、その両方の組み合わせで設定するなどして行われる。前記のように定義される機構部品の種類としては、単なる物体として定義されるものと機能定義がなされるもの(モータ、ソレノイド、クラッチ、センサ、歯車、カム、ローラ等)とがある。また、機構部品には、シミュレーションの対象となる装置の構成物ではないもので、装置の動作シミュレーションに必要なものも含まれる。例えば、シミュレーション対象の装置がプリンタ装置である場合、プリンタ装置における用紙等が装置の動作シミュレーションに必要なものである。 For each mechanical component, information related to the simulation of the mechanical component, such as the shape, type, operation, interference between the mechanical components and cooperation conditions, is defined by the user. Furthermore, external signals are defined for sensors and actuators. The definition of these mechanical parts is performed by automatic setting from a CAD drawing, setting by operating a special mechanical part creation software by a user, or a combination of both. The types of mechanical parts defined as described above include those defined as simple objects and those defined as functions (motors, solenoids, clutches, sensors, gears, cams, rollers, etc.). Further, the mechanical parts include those that are not components of the apparatus to be simulated and are necessary for the operation simulation of the apparatus. For example, when the simulation target apparatus is a printer apparatus, paper in the printer apparatus is necessary for the operation simulation of the apparatus.
機構部品シミュレータ102は、CPUシミュレータ101からHUB104を介して送られてきたアクチュエータ動作信号に対応して、該当するアクチュエータの機構部品動作のシミュレーションを行う。また、アクチュエータに連結された機構部品は、アクチュエータの動作に関連付けて定義された動きで動作をシミュレーションする。なお、オペレータの操作により動作する機構については、キーボード504やマウス505によってオペレータによる機構部品への操作を擬似的に再現し、擬似操作に応じて対象となる機構部品を定義された動きで動作をシミュレーションする。更に、機構部品間の干渉や連携の定義に従い、関連する全ての機構部品の動作をシミュレーションする。
In response to the actuator operation signal sent from the
これら機構部品の動作をシミュレーションした結果、センサとして定義された機構部品にあらかじめ定義された外部から様々な働きかけ(以下、外部事象と記す)が発生すると、外部事象に応じたセンサ信号を変化させるイベントを発生する。前記センサ信号のイベントをHUB104に通知し、シミュレーション処理を継続する。前記センサ信号はHUB104を介してCPUシミュレータ101に送信される。
As a result of simulating the operation of these mechanical components, an event that changes the sensor signal in response to an external event occurs when various predefined external actions (hereinafter referred to as external events) occur in the mechanical component defined as a sensor. Is generated. The event of the sensor signal is notified to the
ここで、機構部品シミュレータ102による機構モデルの表示例を示す。
Here, a display example of a mechanism model by the
図3は、本実施形態における対象装置の一例であるプリンタ装置の機構部品シミュレーションの結果表示アプリケーションによる表示例である。 FIG. 3 is a display example by a result display application of a mechanical component simulation of a printer device which is an example of a target device in the present embodiment.
601は給紙カセット、602はプリント用紙、603は用紙搬送路、604はセンサ、605はローラ、606はフラッパ、607は排紙トレイの機構部品モデルである。これらの機構部品モデルは、機構部品シミュレータ102がシミュレートした機構部品の動作および機構部品に接続される信号のシミュレーションデータを参照する。そして、前記シミュレーションデータの変化に応じて機構部品を動かし、グラフィックとして表示装置503上に表示された例である。
(汎用動作シミュレータ103)
汎用動作シミュレータ103は、CPUシミュレータ101や機構部品シミュレータ102以外の各種装置構成に対応したシミュレーション機能、および、仮想装置に対する各種働きかけの設定機能をもつ。シミュレーションの対象となる実際の装置(本例ではプリンタ装置)は、その装置を使用するオペレータやその装置に接続された外部事象を受けて動作する。汎用動作シミュレータ103は、これら外部事象のうち、機構部品シミュレータ102で設定されるメカニカルな外部事象以外のものを擬似的に設定する方法を提供する。また、シミュレーションの結果の解析、表示及び保存する機能も有する。
(General motion simulator 103)
The general-
本実施形態における対象装置であるプリンタ装置の例では、メカニカルな外部事象としては、給紙カセットの操作や消耗部品の取り外し/取り付け等が挙げられる。一方、それ以外の外部事象としては、ホストPCからの各種命令の受信、オペレータによるオペレーションパネルの操作、環境温度の変化等が挙げられる。 In the example of the printer device that is the target device in the present embodiment, mechanical external events include operation of a paper feed cassette, removal / attachment of consumable parts, and the like. On the other hand, other external events include reception of various commands from the host PC, operation of the operation panel by the operator, change in environmental temperature, and the like.
汎用動作シミュレータ103は、これらを設定するための専用のユーザインタフェース(以下、UIと記す)を提供する。また、汎用動作シミュレータ103は、当該UIによる設定に従って、HUB104を介してCPUシミュレータ101や機構部品シミュレータ102に所定の外部事象を加える。
The general-
また、汎用動作シミュレータ103は、コンピュータシステム501のハードディスクに格納された、連続した外部事象の設定手順を記述したマクロ命令ファイルや一連の外部事象データを記述したファイルを必要に応じて読み出す。そして、HUB104を介してCPUシミュレータ101や機構部品シミュレータ102に対して一連の外部事象を与える。
Further, the general-
なお、汎用動作シミュレータ103は、機能によって複数の独立プロセスで構成される場合がある。
Note that the general-
なお、以下、機構部品シミュレータ102および汎用動作シミュレータ103の2つのシミュレータをまとめて、CPUの制御対象となる周辺部をシュミュレートする周辺シミュレータと記す。周辺シミュレータは、当該仮想時刻で自身のシミュレータが実行するシミュレーション処理に関する情報(以下、シミュレーション処理情報と記す)を、自身のシミュレータ内部に保持している。前記シミュレーション処理情報は、シミュレーション処理の実行順にシミュレーション処理情報格納部(不図示)に格納し、前記シミュレーション処理情報格納部での格納順にシミュレーション処理を実行する。
Hereinafter, the two simulators, the
(シミュレータインタフェース107a、107b、107c)
CPUシミュレータ101、機構部品シミュレータ102および汎用動作シミュレータ103は、各シミュレータとHUB104とを接続するシミュレータインタフェース107a、107b、107cを介してHUB104と接続されている。なお、シミュレータインタフェース107a、107b、107cは、公知技術であるので詳述は省略する。また、以下、単にシミュレータと記した場合は、CPUシミュレータ101、機構部品シミュレータ102および汎用動作シミュレータ103を含むものである。
(
The
各シミュレータは、処理実行指示部113(詳細は後述する)からの処理実行指示に従って処理を行う。また、周辺シミュレータは、処理実行指示部113から指示されたシミュレーション処理の実行を終えると、シミュレータインタフェース107b、107cを介してHUB104に処理の実行終了を通知する。以下、指示された処理の実行終了の通知を、実行終了通知と記す。なお、シミュレーション処理の実行の終了判断については、後述する。
Each simulator performs a process in accordance with a process execution instruction from a process execution instruction unit 113 (details will be described later). Further, when the peripheral simulator finishes executing the simulation process instructed by the process
(HUB104)
HUB104は、コア部105とインタフェースモジュール106a、106b、106cとから構成される。インタフェースモジュール106a、106b、106cは、コア部105と各シミュレータとの接続を仲介する機能を有する。なお、インタフェースモジュール106a、106b、106cは、公知の技術であるので詳述は省略する。
(HUB104)
The
コア部105は、連携動作定義情報管理モジュール109と連携動作モジュール112とから構成され、シミュレータ間のデータ伝送管理、同期処理、データ伝送履歴の取得を行う機能を有する。なお、HUB104は、機器モデルシミュレータ102および汎用動作シミュレータ103などの他のアプリケーションとは独立したプロセスで動作している。
The
連携動作定義情報管理モジュール109は、シミュレータ間を連携動作させるための情報を管理するモジュールであり、ソフトウェアタイマ情報110とシミュレータ間での配線定義情報111とを有する。ソフトウェアタイマ情報110とは、シミュレータ間の連携動作トリガとなるソフトウェアタイマに関する情報であり、タイマ特定情報とタイマ間隔情報とを含む。ここで、タイマ特定情報とは、ターゲットファームウェアが扱う変数のうち、いずれがソフトウェアタイマの変数であるかを特定する情報に相当する。また、タイマ間隔情報とは、ソフトウェアタイマ値の変化間隔が仮想時間相当でいくつになるのかの設定情報に相当する。
The cooperative operation definition
配線定義情報111は、シミュレータ間を結ぶデータに関する各種設定情報である。配線定義情報111は、例えば、機器制御シミュレーションシステム中のモータ駆動信号は、CPUシミュレータ101から出力されて機構部品シミュレータ102に入力される、といった情報である。
The
連携動作モジュール112は、処理実行指示部109とイベント伝達部114とから構成される。連携動作モジュール112は、ソフトウェアタイマの変化を仮想時刻の1単位として、前記1単位ごとに複数シミュレータ間の仮想時刻を一致させる同期処理を行う。また、各シミュレータのシミュレーション動作に伴って発生したイベントを、配線定義情報111に従って該シミュレータへ伝達する処理を行う。
The
イベント伝達部114は、シミュレーション動作中に発生したイベントがソフトウェアタイマ値の変化(以下、タイマイベントと記す)であるか、タイマイベント以外のイベント(以下、データイベントと記す)であるかを判断する。そして、前記イベントにイベントの種類がタイマイベントかデータイベントであるかを特定する情報を付加して、当該シミュレータにイベントを伝達する。
The
イベント伝達部114は、発生イベントがソフトウェアタイマ情報110で特定されるソフトウェアタイマに相当するシミュレーションデータ値の変化である場合、発生イベントがタイマイベントであると判断する。一方、発生イベントがソフトウェアタイマに相当するシミュレーションデータ値の変化ではない場合、データイベントと判断する。なお、発生イベントがタイマイベントである場合、イベント伝達部114は、全ての周辺シミュレータにイベントを伝達する。一方、発生イベントがデータイベントである場合、イベント伝達部114は、あらかじめ設定された配線定義情報111に従って、発生イベントを当該シミュレータに伝達する。各シミュレータは、データイベントの発生に応じて前記データイベントに関するシミュレーション動作を行う。
When the generated event is a change in the simulation data value corresponding to the software timer specified by the
処理実行指示部113は、各シミュレータに対してシミュレーション処理の実行指示(以下、処理実行指示と記す)を出す。前記処理実行指示は、CPUシミュレータ101に対しては、シミュレーション処理を実行する仮想時間を指定することなく処理実行を指示する。一方、周辺シミュレータには、前記タイマ間隔情報の示す仮想時間相当のシミュレーション処理実行を指示する。前記処理実行指示は、シミュレータインタフェース107a、107b、107cを介して、各シミュレータに伝達される。
The process
処理実行指示部113は、イベント伝達部114が、シミュレーションシステムで発生したイベントをCPUシミュレータで発生したデータイベントと判断した場合、即座にCPUシミュレータ102に対して処理実行開始を指示する。イベント伝達部114が、シミュレーションシステムで発生したイベントをタイマイベントと判断した場合は、次の処理をする。すなわち、連携動作させる全ての周辺シミュレータから実行終了通知を受信した時点で、次の仮想時刻のシミュレーション処理を実行するよう、再び各シミュレータに処理実行を指示する。
When the
(外部インタフェース108)
外部インタフェース108は、オペレータ108aが設定した、シミュレーションシステムを構成する複数のシミュレータが連携動作を行うための各種情報を、コア部105の外部からコア部105に渡す際のインタフェースとなる。
(External interface 108)
The
<本実施形態のソフトウェアタイマの設定例>
ここで、本実施形態のソフトウェアタイマ情報110の設定方法について、外部インタフェース108としてGUI(グラフィカルユーザインタフェース)を使用する場合を例にあげて説明する。
<Setting example of software timer of this embodiment>
Here, the setting method of the
図4は、前記GUIによって前記表示装置503上に表示されるソフトウェアタイマ情報設定のための表示例である。GUIには、ソフトウェアタイマに相当するターゲットファームウェアで扱う変数名設定欄401とタイマ間隔設定欄402とがある。シミュレーションシステムのオペレータは、設定対象の欄をマウス505により指定し、該指定個所にキーボード504から数字もしくは文字を記入する。ソフトウェアタイマの変数名設定欄401であれば、ソフトウェアで扱うソフトウェアタイマの変数名を記入する。タイマ間隔設定欄402であれば、ソフトウェアタイマ値の変化間隔がシミュレータ上の仮想時間相当でいくつであるのかを数字で記入し、仮想時刻の1単位が仮想時間相当でいくつであるのかを設定する。
FIG. 4 is a display example for setting software timer information displayed on the
オペレータがソフトウェアタイマの変数名およびタイマ間隔設定終了後、OKボタン403をマウス505でクリックした時点で、タイマ特定情報とタイマ間隔情報とを確定する。そして、確定されたタイマ特定情報とタイマ間隔情報とは、外部インタフェース108を介して連携動作定義情報管理部109の中に格納される。前記格納された情報がソフトウェアタイマ情報110である。シミュレーションシステムの動作開始時、前記ソフトウェアタイマ情報110のタイマ特定情報として設定されたソフトウェアタイマの変数名から、前記変数名の示すソフトウェアタイマ変数が配置されているターゲットCPUのアドレスを取得する。前記ソフトウェアタイマ変数のアドレス取得には、CPUシミュレータ101のもつデバッグ情報(不図示)を使用する。
When the operator clicks the
上記説明では外部インタフェース108としてGUIを使用した例を挙げたが、GUI以外に、外部ファイルインタフェースやプロセス間通信を使用し、コア部105がソフトウェア情報を取得する方法もある。外部ファイルインタフェースを使用する場合、あらかじめ定義された書式に従って編集したソフトウェア情報を記述したファイルをユーザが用意し、外部ファイルインタフェースを介してソフトウェア情報を取得する。プロセス間通信を使用する場合は、前記コア部105とプロセス間通信で接続されている不図示のシミュレーション実行環境指定のためのアプリケーション(前記コア部分と別プロセス)を使用し、ユーザがソフトウェアタイマ情報110を設定する方法もある。
In the above description, the GUI is used as the
<実施形態1のシミュレーションシステムの動作手順例>
以下、シミュレーション中のHUB104、CPUシミュレータ101、周辺シミュレータの動作手順例についてフローチャートを用いて説明する。
<Example of Operation Procedure of Simulation System of
Hereinafter, operation procedure examples of the
(HUB104の動作手順例)
図5は、シミュレーションシステムを構成する複数シミュレータを連携動作させるためのHUB104の動作手順例を示したフローチャートである。
(Operation procedure example of HUB104)
FIG. 5 is a flowchart showing an example of an operation procedure of the
まず、処理実行指示部113がインタフェースモジュール106aを介して、CPUシミュレータ101にシミュレーション処理実行の開始を指示する(S801)。続いて、インタフェースモジュール106bおよび106cを介して、周辺シミュレータにソフトウェタイマの1単位に相当する仮想時間分のシミュレーション処理実行を指示する(S802)。なお、ソフトウェアタイマの1単位の仮想時間は、タイマ間隔情報の示す仮想時間である。
First, the process
次に、各シミュレータからのイベントが発生するまでウェイトする(S803)。イベント伝達部113が、ステップS803で発生したイベントがタイマイベントであるかをチェックする(S804)。
Next, the process waits until an event from each simulator occurs (S803). The
ステップS804でのチェック結果で発生したイベントがタイマイベントである場合は、イベント伝達部113が、インタフェースモジュール106bおよび106cを介して、全周辺シミュレータにタイマイベント情報を伝達する(S805)。全での周辺シミュレータにタイマイベントの伝達後、処理実行指示部113が全での周辺シミュレータから実行終了通知を受け取るまでウェイトする(S806)。処理実行指示部113が全ての周辺シミュレータから実行終了通知を受け取った時点で、ステップS801の処理へ戻り、次の仮想時刻の連携動作処理に移行する。
If the event generated as a result of the check in step S804 is a timer event, the
ステップS804でのチェック結果で発生したイベントがタイマイベントでない(すなわちデータイベントである)場合、イベント伝達部113は、配線定義情報111に従って該シミュレータにデータイベントを伝達する(S807)。続いて、ステップS807で伝達したデータイベントの発生源がCPUシミュレータ101であるかをチェックする(S808)。ステップS808でのチェックの結果、データイベント発生源がCPUシミュレータ101である場合、CPUシミュレータ101に処理実行の開始を指示する(S809)。ステップS808でのチェックの結果、データイベント発生源がCPUシミュレータ101でない(周辺シミュレータである)場合、ステップS803に戻って各シミュレータからのイベントが発生するまでウェイトする。
If the event generated as a result of the check in step S804 is not a timer event (that is, a data event), the
(CPUシミュレータ101の動作手順例)
次に、検証対象のソフトウェア動作をシミュレーションするCPUシミュレータ101のシミュレーション中の動作について、図6を用いて説明する。
(Operation procedure example of CPU simulator 101)
Next, the operation during the simulation of the
図6は、CPUシミュレータ101の動作手順例を示したフローチャートである。
FIG. 6 is a flowchart showing an example of the operation procedure of the
CPUシミュレータ101は、処理実行指示部113からの処理実行指示を受信するまでウェイトする(S901)。処理実行指示を受信後、シミュレーション処理を実行する(S902)。シミュレーション実行中にイベントが発生すると(S903)、HUB104にイベント発生を通知し(S904)、シミュレーション処理を一時停止させる(S905)。ステップS905でシミュレーション処理を一時停止させた後は、ステップS901に戻って処理実行の指示を受信するまでウェイトする(図5のステップS801, S809参照)。
The
(周辺シミュレータの動作手順例)
図7は、周辺シミュレータの動作手順例を示したフローチャートである。
(Example of operation procedure of peripheral simulator)
FIG. 7 is a flowchart showing an example of the operation procedure of the peripheral simulator.
周辺シミュレータは、処理実行指示部113からの処理実行指示を受信するまでウェイトする(S1001)。処理実行指示を受信後、シミュレーション処理を実行する(S1002)。シミュレーション実行中にイベントが発生したら(S1003)、前記イベントの発生をHUB104に通知する(S1004)。そして、処理実行指示部113から指示された仮想時間分のシミュレーション処理が終了したかをチェックする(S1005)。
The peripheral simulator waits until it receives a process execution instruction from the process execution instruction unit 113 (S1001). After receiving the process execution instruction, the simulation process is executed (S1002). If an event occurs during the simulation (S1003), the occurrence of the event is notified to the HUB 104 (S1004). Then, it is checked whether the simulation process for the virtual time instructed from the process
ステップS1005のチェックの結果、指定された仮想時間分のシミュレーション処理が終了していたら、HUB104に実行終了の通知を送信(S1006)し、ステップS1001に戻って処理実行指示を受信するまでウェイトする。一方、ステップS1005のチェックの結果、指定された仮想時間分のシミュレーション処理が終了していなかった場合は、ステップS1002のシミュレーション処理実行の処理に戻る。 If the simulation processing for the designated virtual time has been completed as a result of the check in step S1005, an execution completion notification is transmitted to the HUB 104 (S1006), and the process waits until the processing execution instruction is received by returning to step S1001. On the other hand, if the result of the check in step S1005 is that the simulation process for the designated virtual time has not been completed, the process returns to the simulation process execution process in step S1002.
なお、ステップS1005での「指定された仮想時間分のシミュレーション処理終了」の判断条件は、次のような条件である。当該仮想時刻における処理として予め定められたシミュレーション処理を終了し、かつ、イベント伝達部113から伝達されたタイマイベント以前に受信したデータイベントに関するシミュレーション処理を全て終了していることである。
Note that the determination condition of “simulation process end for specified virtual time” in step S1005 is as follows. That is, the simulation process predetermined as the process at the virtual time is finished, and all the simulation processes related to the data event received before the timer event transmitted from the
以上の処理により、周辺シミュレータはタイマイベント受信以前に受信したデータイベントを該仮想時刻でのシミュレーションデータ変化としてシミュレーション動作する。これにより、シミュレーション処理実行タイミングによらず、シミュレーションデータの変化をシミュレーションデータの変化が発生した仮想時刻と同一の仮想時刻の処理に反映することができる。 With the above processing, the peripheral simulator performs a simulation operation using the data event received before the timer event reception as simulation data change at the virtual time. Thereby, regardless of the simulation process execution timing, the change in the simulation data can be reflected in the process at the same virtual time as the virtual time when the change in the simulation data occurs.
<実施形態1のシミュレーションシステムの連携動作例>
(実施形態1のシミュレーションシステムの具体的構成例)
ここで、実施形態1により、CPUシミュレータ、機構部品シミュレータをそれぞれ連携動作させて、1つのプリンタエンジンシミュレータとして動作させる場合を例に挙げる。
<Example of Cooperation Operation of Simulation System of
(Specific Configuration Example of Simulation System of Embodiment 1)
Here, a case will be described as an example in which the CPU simulator and the mechanism component simulator are operated in cooperation with each other according to the first embodiment to operate as one printer engine simulator.
本例では、シミュレーション対象CPUを制御するソフトウェアは、1ms毎に変化するソフトウェアタイマ(変数名:TimerA)を基準に動作する。また、シミュレーション対象のプリンタ装置は、プリンタ装置の所定位置にある紙を紙搬送モータが駆動源である紙搬送ローラが搬送する。紙搬送モータの駆動信号が出力されてから500ms後に、搬送された紙の先端が紙検知センサに到達し、紙検知センサ信号が紙検知状態に変化するよう動作するものとする。 In this example, the software that controls the simulation target CPU operates based on a software timer (variable name: TimerA) that changes every 1 ms. Further, in the printer device to be simulated, paper at a predetermined position of the printer device is transported by a paper transport roller whose drive source is a paper transport motor. It is assumed that 500 ms after the drive signal of the paper transport motor is output, the leading edge of the transported paper reaches the paper detection sensor, and the paper detection sensor signal is changed to the paper detection state.
各シミュレータは、図8のように連携動作し、以下の1)-7)のような順序で動作する。
1):CPUシミュレータ101が紙搬送制御101bを開始する。
2):CPUシミュレータ101がモータ駆動信号を出力する(101a)。
3):モータ駆動信号の出力によって、機構部品シミュレータ102のモータモデルが駆動する(102a)。
4):モータ駆動によって、モータを駆動源とする紙搬送ローラモデルが紙モデルを搬送する(102b)。
5):紙モデルの搬送によって、紙搬送路上の所定位置に設置されている機構部品シミュレータ102上の紙検知センサモデル(以下、単にセンサと記す)が紙検知状態に変化する(102c)。
6):CPUシミュレータ101にセンサ変化が入力される。
7):CPUシミュレータ101はセンサ信号変化に応じた紙搬送制御を行う(101b)。
8):CPUシミュレータ101はモータ駆動信号出力する(101a)。
シミュレーションシステムのユーザは、ソフトウェアタイマ情報を以下の表1のように設定する。
Each simulator operates in cooperation as shown in FIG. 8 and operates in the following order 1) -7).
1): The
2): The
3): The motor model of the
4): By driving the motor, the paper transport roller model using the motor as the drive source transports the paper model (102b).
5): The paper detection sensor model (hereinafter simply referred to as a sensor) on the
6): Sensor change is input to the
7): The
8): The
The user of the simulation system sets the software timer information as shown in Table 1 below.
(実施形態1のシミュレーションシステムの動作例)
図9は、実施形態1における各シミュレータとHUB104の連携動作を示した模式図である。
(Operation example of simulation system of embodiment 1)
FIG. 9 is a schematic diagram showing a cooperative operation between each simulator and the
まず、(1):HUB(プロセス接続部)104は、各シミュレータにシミュレーション処理の実行を指示する。(2):CPUシミュレータ101は、処理実行の指示を受ける。(3)(4):機構部品シミュレータ102と汎用動作シミュレータ103は、ソフトウェアタイマ情報110のタイマ間隔分のシミュレーションを実行するよう指示を受ける。各シミュレータでシミュレーション処理を開始する。
First, (1): HUB (process connection unit) 104 instructs each simulator to execute simulation processing. (2): The
(5):CPUシミュレータ101でソフトウェアタイマ値の変化(1msの経過)が発生すると、CPUシミュレータ101は、HUB104にイベント発生を通知し、自身のシミュレーションを一時停止させる。
(5): When a software timer value change (elapse of 1 ms) occurs in the
(6):HUB104のイベント伝達部113は、(5)で発生したイベントがタイマイベントであると判別し、タイマイベント発生を機構部品シミュレータ102と汎用動作シミュレータ103に伝達する。(7)(8):機構部品シミュレータ102と汎用動作シミュレータ103は、HUBからタイマイベントを伝達される。そして、タイマイベント伝達前までにHUB104から受信したデータイベントに関するシミュレーション処理を含むタイマ間隔分のシミュレーション処理実行する。前記タイマ間隔分のシミュレーション処理とは、該仮想時刻で行う処理として予め決められたシミュレーションと、データイベント発生によるシミュレーションとの両方のシミュレーション処理のことである。データイベント発生によるシミュレーションとは、例えば、CPUシミュレータ101の機構部品Aの駆動信号出力によるデータイベント発生による、機構部品シミュレータ102が実行するタイマ間隔分の機構部品Aの駆動シミュレーションなどである。
(6): The
(9)(10):機構部品シミュレータ102および汎用動作シミュレータ103は、タイマ間隔分に相当する仮想時間分のシミュレーション処理を終了すると、実行終了をHUBに通知する。(11):HUB104は全ての周辺シミュレータから実行終了の通知を受け取ると、CPUシミュレータ101と機構部品シミュレータ102、および汎用動作シミュレータ103に処理実行を指示する。
(9) (10): The
(12)(13)(14):前記処理実行指示を受け取った各シミュレータは、再び処理実行を開始する。 (12) (13) (14): Each simulator that has received the processing execution instruction starts processing execution again.
以上を繰り返すことで、複数シミュレータ間の仮想時刻を一致させ、シミュレーションを行う。 By repeating the above, the simulation is performed by matching the virtual time between the plural simulators.
<実施形態1のシミュレーションの結果>
図10は、上述の実施形態1のシミュレーションシステムで複数シミュレータ間のシミュレーションを行った際のシミュレーションの結果を示した図である(従来例の図20及び図21を参照)。図10には、検証対象ソフトウェアの振る舞いが全く同じである場合に、検証対象ソフトウェアが制御するCPUのシミュレータに対するイベントが、ソフトウェアタイマを基準にして同一時刻に伝達されることを概念的に示している。
<Results of simulation of
FIG. 10 is a diagram showing a simulation result when a simulation between a plurality of simulators is performed in the simulation system of the first embodiment (see FIGS. 20 and 21 of the conventional example). FIG. 10 conceptually shows that events for the CPU simulator controlled by the verification target software are transmitted at the same time on the basis of the software timer when the behavior of the verification target software is exactly the same. Yes.
実施形態1のHUB104は、検証対象ソフトウェアのソフトウェアタイマ値の変化をトリガにして複数シミュレータ間の連携動作を行っている。そのため、従来のシミュレーションシステムで起こっていたイベント発生タイミングが、ソフトウェアタイマ値の切り替わりの前後いずれであるかによる、イベント伝達のばらつきは起こらない。このことは、センサ信号のイベント発生タイミングが図10中のA、Bのいずれの場合にも、CPUシミュレータに対して同一のソフトウェアタイマの時刻(図10では500ms)にセンサ信号変化のイベントが伝達されていることからもわかる。
The
また、実施形態1での周辺シミュレータは、タイマイベント、つまりソフトウェアタイマ値の変化の発生を伝達される以前に受け取ったデータイベントについては、該仮想時刻でシミュレーション処理を行う。すなわち、CPUシミュレータで発生したモータ駆動信号の出力に関するシミュレーション処理は、必ずモータ駆動信号が出力されたのと同一の仮想時刻(図10では1ms)で行われる。従って、実施形態1のシミュレーションシステムでは、CPUシミュレータがモータ駆動信号を出力してから、CPUシミュレータにセンサ信号の変化が伝達されるまでのソフトウェアタイマ値は500msとなる。すなわち、ソフトウェアタイマ値の変化のタイミングで各シミュレータの同期をとる本方法によれば、CPUシミュレータがモータ駆動信号を出力した時点から、ソフトウェアタイマで500ms後にセンサ信号を紙検知状態に変化するのを保証できる。そのため、精度の良いシミュレーションを行うことができる。 In addition, the peripheral simulator in the first embodiment performs a simulation process at the virtual time for the data event received before the timer event, that is, the occurrence of the change of the software timer value is transmitted. That is, the simulation process related to the output of the motor drive signal generated by the CPU simulator is always performed at the same virtual time (1 ms in FIG. 10) as the motor drive signal is output. Therefore, in the simulation system of the first embodiment, the software timer value from when the CPU simulator outputs a motor drive signal to when the change of the sensor signal is transmitted to the CPU simulator is 500 ms. That is, according to this method of synchronizing each simulator at the timing of the change of the software timer value, the sensor signal is changed to the paper detection state after 500 ms by the software timer from the time when the CPU simulator outputs the motor drive signal. Can be guaranteed. Therefore, a highly accurate simulation can be performed.
<実施形態1の効果>
上記のように、複数シミュレータ間の連携動作を検証対象ソフトウェアのソフトウェアタイマを1単位として行う。それにより、検証対象ソフトウェアが機器制御で使用するタイマの動作単位でシミュレーションシステムを構成する全てのシミュレータの仮想時刻を一致させることができる。
<Effect of
As described above, the cooperative operation between a plurality of simulators is performed using the software timer of the verification target software as one unit. Thereby, the virtual times of all simulators constituting the simulation system can be matched with the operation unit of the timer used by the verification target software for device control.
また、周辺シミュレータは、タイマイベント受信以前に受信したデータイベントを該仮想時刻で発生したシミュレーションデータの変化として捉える。そして、該仮想時刻のシミュレーション動作に前記データイベントに伴うシミュレーション処理を実行することができる。そのため、各シミュレータの処理実行タイミングに因らず、シミュレーションデータの変化をシミュレーションデータの変化が発生した仮想時刻のシミュレーション処理に反映することができる。 Also, the peripheral simulator regards the data event received before the timer event reception as a change in simulation data generated at the virtual time. A simulation process associated with the data event can be executed in the simulation operation at the virtual time. Therefore, regardless of the process execution timing of each simulator, the change in the simulation data can be reflected in the simulation process at the virtual time when the change in the simulation data occurs.
更に、検証対象ソフトウェアのソフトウェアタイマ単位でシミュレーションシステムの同期処理を行うため、同期間隔を必要以上に小さくすることなく精度のよいシミュレーションを実行することができる。つまり、シミュレーション実行目的を満たすために最適な同期間隔でシミュレータ間の連携動作を行うことができる。その結果として、シミュレーション実行環境資源の有効利用が可能になり、シミュレーションの利用効率を上げることができる。 Furthermore, since the simulation system synchronization processing is performed in units of software timers of the verification target software, it is possible to execute a highly accurate simulation without reducing the synchronization interval more than necessary. That is, the cooperative operation between simulators can be performed at an optimal synchronization interval to satisfy the simulation execution purpose. As a result, the simulation execution environment resource can be effectively used, and the use efficiency of the simulation can be improved.
[実施形態2]
実施形態1では、複数シミュレータ間の連携動作トリガとなるソフトウェアタイマが、シミュレーション実行中は常に同じ場合の例であった。しかし、シミュレータ間の連携動作トリガを、ソフトウェアの処理内容によってシミュレーション実行途中で変更させたい場合がある。
[Embodiment 2]
In the first embodiment, the software timer serving as a cooperative operation trigger between a plurality of simulators is always the same during simulation execution. However, there is a case where it is desired to change the cooperation operation trigger between simulators during the simulation execution depending on the processing contents of the software.
そこで、実施形態2では、シミュレーション実行途中で、複数シミュレータ間の連携動作トリガのソフトウェアタイマを変更する場合のシミュレーションシステムについて説明する。 Therefore, in the second embodiment, a simulation system in the case where the software timer for the cooperative operation trigger between a plurality of simulators is changed during the execution of the simulation will be described.
<実施形態2のシミュレーションシステムの機能構成例>
実施形態2のシミュレーションシステムは、実施形態1のシミュレーションシステムでのシミュレーションシステム構成に、新たに1つの構成要素が加わったものである。
<Functional Configuration Example of Simulation System of
The simulation system according to the second embodiment is obtained by adding one new component to the simulation system configuration of the simulation system according to the first embodiment.
図11に、実施形態2のシミュレーションシステムの機能構成例を示す。なお、図11の1401〜1414は、図1の101〜114に相当するので説明の重複は避ける。
FIG. 11 shows a functional configuration example of the simulation system of the second embodiment. Note that
実施形態2の新規な構成要素であるソフトウェアタイマ情報管理部1415は、シミュレータ間の連携動作トリガとなるソフトウェアタイマ(以下、連携動作トリガタイマと記す)を変更する条件を示す情報1416を保持する。この情報を、以下、連携動作トリガタイマ変更情報1416と称す。前記連携動作トリガタイマ変更情報1416に従い、シミュレーションの該仮想時刻での連携動作トリガタイマの決定及びソフトウェアタイマ情報1410の更新を行う。
The software timer
実施形態1では、シミュレーション実行中にシミュレータ間の連携動作トリガとなるソフトウェアタイマを変更することがなかった。そのため、シミュレータ間の連携動作トリガとなるソフトウェアタイマ情報110は、ユーザがGUIや外部ファイルインタフェース等を使用して設定したタイマ特定情報とタイマ間隔情報とであった。
In the first embodiment, the software timer serving as a cooperative operation trigger between simulators is not changed during simulation execution. Therefore, the
実施形態2の場合、シミュレーション実行中にシミュレータ間の連携動作トリガとなるソフトウェアタイマを変更するため、ソフトウェアタイマ情報管理部1415が、次のような処理を行う。すなわち、HUB(プロセス接続部)1404の外部から設定された連携動作トリガタイマ変更情報1416に従って、タイマ特定情報とタイマ間隔情報とをソフトウェアタイマ情報1410に設定する。かかるタイマ特定情報とタイマ間隔情報とが、シミュレーションの該仮想時刻でのシミュレータ間の連携動作トリガとなるソフトウェアタイマのタイマ特定情報とタイマ間隔情報となる。
In the case of the second embodiment, the software timer
<連携動作トリガタイマの変更例>
(連携動作トリガタイマ変更情報例)
連携動作トリガタイマの変更条件は、例えば、ソフトウェアが扱う所定の変数(変数名:A)が所定値(所定値:B)の時、ソフトウェアが扱う変数(変数名:TimerA)を連携動作トリガとなるソフトウェアタイマとする、といった条件である。
<Example of changing the cooperative operation trigger timer>
(Example of change information for cooperative operation trigger timer)
For example, when the predetermined variable (variable name: A) handled by the software is a predetermined value (predetermined value: B), the variable (variable name: TimerA) handled by the software becomes the cooperative operation trigger. This is a condition such as a software timer.
図12は、連携動作トリガタイマ変更情報1416を設定するGUIの例である。前記GUIには、ソフトウェアタイマに相当するターゲットファームウェアで扱う変数名設定欄121と、タイマ間隔設定欄122、および該ソフトウェアタイマを連携動作トリガとして使用する条件設定欄123の3つがある。図12のGUIは、以下の連携動作トリガタイマ変更情報を示している。
FIG. 12 is an example of a GUI for setting the cooperative operation trigger
ソフトウェアが扱う変数Aが"1"の時、連携動作トリガタイマとしてソフトウェアタイマ"TimerA"を使用し、ソフトウェアが扱う変数Aが"10"の時、連携動作トリガタイマとしてソフトウェアタイマ"TimerB"を使用する。また、ソフトウェアが扱う変数Aが"20"の時、連携動作トリガタイマとしてソフトウェアタイマ"TimerC"を使用する。各タイマのタイマ間隔はTimerA:1[ms]、TimerB:10[ms]、TimerC:20[ms]である。 When the variable A handled by the software is “1”, the software timer “TimerA” is used as the cooperative operation trigger timer. When the variable A handled by the software is “10”, the software timer “TimerB” is used as the cooperative operation trigger timer. When the variable A handled by the software is “20”, the software timer “TimerC” is used as the cooperative operation trigger timer. The timer intervals of each timer are Timer A: 1 [ms], Timer B: 10 [ms], and Timer C: 20 [ms].
ユーザは、変数名設定欄121に、シミュレーション実行時の複数シミュレータ間の連携動作トリガとするソフトウェアタイマの変数名を設定する。また、タイマ間隔設定欄122に、前記ソフトウェアタイマの値が変化する間隔に相当する仮想時間を設定する。更に、条件設定欄123に、前記ソフトウェアタイマをトリガとして連携動作する際の条件を設定する。各設定欄への数値および文字の記入方法は、図4でのソフトウェアタイマ情報110の設定時と同様である。
The user sets in the variable
ユーザが、連携動作トリガタイマ変更情報の記入を終えたら、GUI上のOKボタン124をマウス505でクリックする。GUI上のOKボタン124が押された時点で、タイマ特定情報とタイマ間隔情報、および前記連携動作トリガタイマの使用条件情報を確定する。そして、外部インタフェース1408を介してソフトウェアタイマ情報管理部1415中に格納される。また、連携動作トリガタイマ変更条件の欄を追加したい場合には、追加ボタン125をクリックすることで、連携動作トリガタイマ変更条件の欄が既存の設定欄の下に追加される。
When the user finishes entering the cooperative operation trigger timer change information, the user clicks the
(ソフトウェアタイマ情報管理部の動作手順例)
ここで、ソフトウェアタイマ情報管理部1415の連携動作トリガタイマの管理手順例について説明する。
(Example of operation procedure of software timer information manager)
Here, an example of the management procedure of the cooperative operation trigger timer of the software timer
図13は、ソフトウェアタイマ情報管理部1415が連携動作トリガタイマを管理するための処理手順例を示したフローチャートである。
FIG. 13 is a flowchart illustrating an example of a processing procedure for the software timer
ソフトウェアタイマ情報管理部1415は、イベントが発生するまでウェイトする(S1601)。イベントが発生した時点で、ソフトウェアタイマ情報管理部1415が保持している連携動作トリガタイマ変更情報1416が示す連携動作トリガタイマ変更条件と、前記イベントとが一致するかをチェックする(S1602)。
The software timer
ステップS1602でのチェック結果が、連携動作トリガタイマ変更条件が成立していた場合は、ソフトウェアタイマ情報1410を一致した連携動作トリガタイマのタイマ特定情報とタイマ間隔情報とに更新して(S1603)、ステップS1601に戻る。ステップS1602でのチェックの結果、連携動作トリガタイマ変更条件が不成立である場合、ステップS1601に戻ってイベント発生をウェイトする。
If the check result in step S1602 shows that the cooperative operation trigger timer change condition is satisfied, the
<実施形態2のシミュレーションの動作例>
CPUシミュレータ1401、機構部品シミュレータ1402をそれぞれ連携動作させて、1つのプリンタエンジンシミュレータとして動作させる場合を例に挙げて、実施形態2のシミュレーションシステムに係る機能を説明する。
<Example of Simulation Operation of
Functions related to the simulation system of the second embodiment will be described by taking as an example a case where the
検証対象CPUは、紙の搬送制御中には、ソフトウェアタイマA(変数名:TimerA)をソフトウェア内の処理タイマとして使用する。紙の搬送制御を行っていない時には、ソフトウェアタイマB(変数名:TimerB)をソフトウェア内の処理タイマとして使用する。また、CPUが紙の搬送制御中であるか否かは、紙搬送制御状態を示す変数(変数名:State)の値によって表される。本例では、CPUが紙搬送制御中の時、変数"State"の値が"1"であり、紙搬送制御中でない時は、変数"State"の値が"0"であるとする。 The verification target CPU uses the software timer A (variable name: TimerA) as a processing timer in the software during paper transport control. When paper conveyance control is not performed, software timer B (variable name: TimerB) is used as a processing timer in the software. Whether or not the CPU is in control of paper conveyance is represented by the value of a variable (variable name: State) indicating the paper conveyance control state. In this example, it is assumed that the value of the variable “State” is “1” when the CPU is performing paper conveyance control, and the value of the variable “State” is “0” when the paper conveyance control is not being performed.
シミュレーションシステムのユーザは、外部インタフェース1408を介して、以下の表2ように、連携動作トリガタイマ変更情報1416を設定する。
The user of the simulation system sets the cooperative operation trigger
ソフトウェアタイマ情報管理部1415は、ソフトウェアの扱う変数"State"の値が"1"に変化するイベントが発生した場合は、ソフトウェアタイマ情報1410のタイマ特定情報を"TimerA"、タイマ間隔情報を"1ms"に設定する。一方、ソフトウェアの扱う変数"State"の値が"0"に変化するイベントが発生した場合は、ソフトウェアタイマ情報1410のタイマ特定情報を"TimerB"、タイマ間隔情報を"10ms"に更新する。
When an event occurs in which the value of the variable “State” handled by software changes to “1”, the software timer
処理実行指示部1413は、ソフトウェアタイマ情報1410のタイマ間隔情報が示す仮想時間分のシミュレーション処理を実行するよう各周辺シミュレータに指示する。また、イベント伝達部1414は、ソフトウェアタイマ情報1410のタイマ特定情報が示すシミュレーションデータに変化が発生した場合に、タイマイベント発生と判断し、各周辺シミュレータにタイマイベント発生を伝達する。
The process
<実施形態2の効果>
上記のように、複数シミュレータ間の連携動作を検証対象ソフトウェアのソフトウェアタイマを1単位として行い、かつ、外部からの指定に応じて、シミュレーション実行中にシミュレータ間の連携動作トリガとなるソフトウェアタイマを変更する。これにより、検証対象ソフトウェアが機器制御の処理に利用するソフトウェアタイマを制御内容により変更している場合でも、シミュレーションシステムを構成する全てのシミュレータの仮想時刻を一致させることができる。かかる一致は、検証対象ソフトウェアが機器制御ごとで使用するタイマの動作単位で行われる。従って、検証対象ソフトウェアが、機器制御ごとに使用するソフトウェアタイマを変更している場合においても、シミュレーション効率を低下させることなくシミュレーション精度を確保することができる。
<Effect of
As described above, the cooperative operation between multiple simulators is performed with the software timer of the software to be verified as one unit, and the software timer that triggers the cooperative operation between simulators is changed during simulation according to the designation from the outside To do. Thereby, even when the verification target software changes the software timer used for the device control process according to the control content, the virtual times of all simulators constituting the simulation system can be matched. Such matching is performed in units of timer operations that the verification target software uses for each device control. Therefore, even when the verification target software changes the software timer used for each device control, the simulation accuracy can be ensured without reducing the simulation efficiency.
[実施形態3」
上記実施形態1および2では、シミュレーションシステムを構成する全てのシミュレータは、1つのソフトウェアタイマを連携動作のトリガとする場合であった。
[Embodiment 3]
In the first and second embodiments, all simulators constituting the simulation system are cases in which one software timer is used as a trigger for the cooperative operation.
実施形態3では、シミュレーションシステムを構成する周辺シミュレータと検証対象CPUのシミュレータを、複数のソフトウェアタイマ値の変化をトリガとして連携動作するシミュレーションシステムについて説明する。複数の処理をそれぞれ異なる時間基準に基づいて実行するソフトウェアを検証する場合には、実施形態3で示すシミュレーションシステムを使用しシミュレーションを行う必要がある。 In the third embodiment, a simulation system is described in which a peripheral simulator and a verification target CPU simulator constituting the simulation system operate in cooperation with a change in a plurality of software timer values as a trigger. When verifying software that executes a plurality of processes based on different time criteria, it is necessary to perform simulation using the simulation system shown in the third embodiment.
<実施形態3のシミュレーションシステムの機能構成例>
実施形態3のシミュレーションシステムの機能構成は、実施形態1のシミュレーションシステム構成の処理実行指示部113とイベント伝達部113とに新たな機能が加わり、また、ソフトウェアタイマ情報110で扱う情報が追加される。
<Functional Configuration Example of Simulation System of
In the functional configuration of the simulation system of the third embodiment, new functions are added to the processing
実施形態1でのソフトウェアタイマ情報110、および実施形態2のソフトウェアタイマ情報1410は、1組のタイマ特定情報とタイマ間隔情報であった。
The
これに対して、実施形態3では、検証対象CPUシミュレータとの連携動作トリガのソフトウェアタイマを周辺シミュレータごとに設定するため、ソフトウェアタイマ情報は、連携動作トリガタイマとなるソフトウェアタイマごとに以下の情報を有する。すなわち、前記ソフトウェアのタイマ特定情報と、前記ソフトウェアタイマを使用して連携する周辺シミュレータのシミュレータIDと、前記ソフトウェアタイマのタイマ間隔情報とを有する。なお、実施形態3では、各シミュレータIDとして、CPUシミュレータは"1"、機構部品シミュレータは"2"、汎用動作シミュレータは"3"とする。 On the other hand, in the third embodiment, the software timer information includes the following information for each software timer serving as the cooperative operation trigger timer because the software timer for the cooperative operation trigger with the verification target CPU simulator is set for each peripheral simulator. . That is, it has timer specification information of the software, a simulator ID of a peripheral simulator that cooperates using the software timer, and timer interval information of the software timer. In the third embodiment, the simulator ID is “1”, the mechanical component simulator is “2”, and the general-purpose operation simulator is “3” as each simulator ID.
<実施形態3のソフトウェアタイマの設定例>
図14は、GUIによって前記表示装置503上に表示されるCPUシミュレータと各周辺シミュレータが連携動作するトリガのソフトウェアタイマを設定する表示例である。
<Setting example of software timer of
FIG. 14 is a display example in which a software timer for a trigger in which the CPU simulator displayed on the
GUIには、周辺シミュレータごとに、CPUシミュレータとの連携動作トリガとなるソフトウェアタイマに相当するターゲットファームウェアで扱う変数名設定欄142がある。変数名設定欄142に記入したタイマ変数名はタイマ特定情報として、連携動作定義情報管理モジュール109に格納される。また、ユーザは、タイマ特定情報およびタイマ間隔情報を図4に示したようなGUIを使用して設定する。前記GUIから設定された各ソフトウェアタイマの前記タイマ特定情報および前記タイマ間隔情報は、連携動作定義情報管理モジュール109に格納される。
The GUI has a variable
連携動作定義情報管理モジュール109は、周辺シミュレータごとの連携動作トリガタイマのタイマ特定情報とタイマ間隔情報とをソフトウェアタイマ情報として扱う。すなわち、図15に示すように、該ソフトウェアタイマ値の変化をトリガにしてCPUシミュレータと連携動作させる周辺シミュレータのシミュレータID及び前記ソフトウェアタイマのタイマ間隔を関係付けて、ソフトウェアタイマ情報として扱う。
The cooperative operation definition
実施形態3でのシミュレーションシステム中の処理実行指示部113は、同一のソフトウェアタイマを使用して、CPUシミュレータと連携動作させる全ての周辺シミュレータから処理実行終了が通知された時点で、次の仮想時間分の処理を指示する。すなわち、その時点で、前記ソフトウェアタイマに関連付けられたタイマ間隔情報に示された仮想時間分の処理を実行するよう、前記同一のソフトウェアタイマを使用してCPUシミュレータと連携動作させる全ての周辺シミュレータに指示する。前記指示と同時に、CPUシミュレータに処理実行を指示し、次の仮想時刻へ進む。
The processing
実施形態3でのシミュレーション中のイベント伝達部114は、配線定義情報111に従って各シミュレータにデータイベントを伝達する。前記ソフトウェアタイマ情報のタイマ特定情報で指定されるソフトウェアタイマ値の変化(タイマイベント)は、前記ソフトウェアタイマ値の変化でCPUシミュレータと連携動作を行う全ての周辺シミュレータに伝達される。
The
<実施形態3のHUBの処理手順例>
ここで、図16に、実施形態3のシミュレーションシステム中の連携動作定義情報管理部109と処理実行指示部113、およびイベント伝達部114を含むHUB104のシミュレーション中の動作手順例のフローチャートを示す。
<Example of HUB Processing Procedure of
Here, FIG. 16 shows a flowchart of an example of an operation procedure during simulation of the
実施形態3のHUB104のシミュレーション中の動作手順例は、図5に示した実施形態1のHUB104の動作手順例に新たな処理が加わったものである。なお、図16中のS1901〜S1904は図5のS801〜S804に相当し、図16中のS1909〜S1911はS図5の807〜S809に相当する。
The operation procedure example during the simulation of the
イベント伝達部114がステップS1903で発生したイベントがタイマイベントであると判断した場合(S1904のY)、前記タイマイベントでCPUシミュレータと連携動作する全ての周辺シミュレータに前記タイマイベントを伝達する(S1905)。なお、シミュレーションシステムを構成するシミュレータのうち、前記タイマイベントでCPUシミュレータと連携動作する周辺シミュレータとは、次の周辺シミュレータである。すなわち、前記タイマイベントの該ソフトウェアタイマに相当するタイマ特定情報と関連付けて管理されているシミュレータIDに相当する周辺シミュレータである。
When the
処理実行指示部113は、ステップS1905でタイマイベント発生を伝達した伝達先の全ての周辺シミュレータから、実行終了を通知されるまでウェイトする(S1906)。ステップS1906で、処理実行指示部113がタイマイベント伝達先の全ての周辺シミュレータから実行終了通知を受信すると、CPUシミュレータにシミュレーション処理実行を指示する(S1907)。続いて、ステップS1905で該タイマイベント発生を伝達した全てのシミュレータに前記タイマイベントの該ソフトウェアタイマのタイマ間隔に相当する仮想時間分のシミュレーション処理実行を指示する(S1908)。ステップS1908で周辺シミュレータに処理実行を指示したら、ステップS1903の処理に戻る。
The process
<実施形態3のシミュレーションシステムの連携動作例>
(実施形態3のシミュレーションシステムの具体例)
ここで、紙面にトナー画像を形成し、前記紙面上のトナー画像を加熱して、紙面上に画像を定着させるプリンタ装置をシミュレーション対象とする機器制御シミュレーションを例に挙げる。
<Example of Cooperation Operation of Simulation System of
(Specific Example of Simulation System of Embodiment 3)
Here, an apparatus control simulation will be described as an example in which a printer device that forms a toner image on a paper surface, heats the toner image on the paper surface, and fixes the image on the paper surface is a simulation target.
シミュレート内容は、画像を定着させる定着器ユニット内の熱源ヒータの温度と、紙搬送モータの動作及び前記紙搬送モータの動作による紙搬送動作とである。熱源ヒータの温度は熱源ヒータの駆動信号出力時間から算出され、また、紙搬送モータの動作はモータ駆動信号出力でモータを駆動する。 The contents of the simulation are the temperature of the heat source heater in the fixing unit for fixing the image, the operation of the paper transport motor, and the paper transport operation by the operation of the paper transport motor. The temperature of the heat source heater is calculated from the drive signal output time of the heat source heater, and the operation of the paper transport motor drives the motor with the motor drive signal output.
本例の機器制御シミュレーションシステムを構成するシミュレータ間の情報フローの模式図を図17に示す。なお、熱源ヒータの温度のシミュレーションを汎用動作シミュレータ103で、紙搬送動作シミュレーションを機構部品シミュレータ102で行う。
FIG. 17 shows a schematic diagram of an information flow between simulators constituting the device control simulation system of this example. The temperature of the heat source heater is simulated by the general-
(熱源ヒータ温度シミュレーション)
熱源ヒータ駆動信号は、CPUシミュレータ101から出力され、汎用動作シミュレータ103へと入力される(101c)。汎用動作シミュレータ103はCPUシミュレータ101から出力されたヒータ駆動信号の出力時間に応じて熱源ヒータの温度を計算し(103a)、前記計算した熱源ヒータの温度をCPUシミュレータ101へと入力する。CPUシミュレータ101は、入力された熱源ヒータの温度に従って、温度制御101dを行う。
(Heat source heater temperature simulation)
The heat source heater drive signal is output from the
(紙搬送動作シミュレーション)
紙搬送モータ駆動信号は、CPUシミュレータ101から出力され、機構部品シミュレータ102へと入力される(101a)。機構部品シミュレータ102は、紙搬送モータ102aを駆動する。そして、機構部品シミュレータ102は、紙搬送モータ駆動によって紙を搬送し(102b)、前記紙搬送によって生じた紙搬送路上の紙検知センサの変化(102c)をCPUシミュレータ101へと入力する。CPUシミュレータ101は、入力された紙検知センサの変化に従って、紙搬送制御101bを行う。
(Paper transport operation simulation)
The paper transport motor drive signal is output from the
また、プリンタ装置を制御するCPUのソフトウェアは、熱源ヒータの駆動信号をプリンタ装置の交流電源の周波数に基づき生成されるソフトウェアタイマA(タイマ変数名:TimerA、タイマ間隔:1ms)を使用して制御する。そして、CPUに入力されるヒータ熱源の温度をヒータ駆動信号の制御にフィードバックさせる。 The CPU software for controlling the printer device controls the drive signal of the heat source heater using a software timer A (timer variable name: Timer A, timer interval: 1 ms) generated based on the frequency of the AC power supply of the printer device. To do. Then, the temperature of the heater heat source input to the CPU is fed back to the control of the heater drive signal.
また、紙搬送ローラの駆動源である紙搬送モータを、CPUの動作クロックに基づいて生成されるソフトウェアタイマB(タイマ変数名:TimerB、タイマ間隔:5ms)を使用して制御する。そして、CPUに入力される紙検知センサ信号を紙搬送制御制御にフィードバックさせる。ソフトウェアタイマAは、例えばソフトウェアデバッガが有するインターバル割込み機能を使用して、ソフトウェアタイマBとは異なる時間基準を基に生成される。 Further, the paper transport motor that is the drive source of the paper transport roller is controlled using a software timer B (timer variable name: Timer B, timer interval: 5 ms) generated based on the operation clock of the CPU. The paper detection sensor signal input to the CPU is fed back to the paper transport control control. The software timer A is generated based on a time reference different from that of the software timer B by using, for example, an interval interrupt function included in the software debugger.
実施形態1および2のシミュレーションシステムのように1つのソフトウェアタイマをシミュレータ間の連携動作をすると、上記のような場合には、より精度の高い制御において必要な同期精度を確保することができない。これは、いずれか一方のソフトウェアタイマを基準にシミュレータ間を連携動作させるためである。 When one software timer performs a cooperative operation between simulators as in the simulation systems of the first and second embodiments, in the above case, it is not possible to ensure the synchronization accuracy required for more accurate control. This is because the simulators are linked to each other based on one of the software timers.
まず、シミュレーションシステムのユーザは、外部インタフェース1408を介して、表3のように、連携動作トリガタイマ情報を設定する。
First, the user of the simulation system sets cooperative operation trigger timer information as shown in Table 3 via the
なお、本例で示されるシミュレーションシステムでは、連携動作トリガタイマ情報は、図15で示される3つの項目内容で扱われる。 In the simulation system shown in this example, the cooperative operation trigger timer information is handled by the three item contents shown in FIG.
(実施形態3のシミュレーションシステムの動作例)
図18は、本例の各シミュレータとHUBの連携動作を示した模式図である。
(Operation Example of Simulation System of Embodiment 3)
FIG. 18 is a schematic diagram showing the cooperative operation of each simulator and HUB in this example.
(1):まず、HUBは、各シミュレータにシミュレーション処理実行を指示する。(2):CPUシミュレータに対して処理実行を指示する。(3):汎用動作シミュレータに対しては1ms分のシミュレーションを実行するよう指示する。(4):そして、機構部品シミュレータに対しては仮想時間5ms分のシミュレーションを指示する(4)。各シミュレータでシミュレーション処理を開始する。 (1): First, the HUB instructs each simulator to execute simulation processing. (2): Instructs the CPU simulator to execute processing. (3): Instruct the general-purpose operation simulator to execute a 1-ms simulation. (4): Then, a simulation for a virtual time of 5 ms is instructed to the mechanical part simulator (4). Start the simulation process in each simulator.
(5A):CPUシミュレータでソフトウェタイマ"TimerA"の値変化が発生し、CPUシミュレータはシミュレーションを一時停止させる。(6A):HUBは、(5A)で発生したイベントがタイマイベントであると判別し、タイマイベント発生をソフトウェアタイマ"TimerA"の値の変化でCPUシミュレータと連携動作する汎用動作シミュレータに伝達する。(7A):汎用動作シミュレータは、HUBからタイマイベントを伝達される。 (5A): A value change of software timer “Timer A” occurs in the CPU simulator, and the CPU simulator temporarily stops the simulation. (6A): The HUB determines that the event generated in (5A) is a timer event, and transmits the timer event occurrence to a general-purpose operation simulator that operates in cooperation with the CPU simulator by a change in the value of the software timer “TimerA”. (7A): The general purpose operation simulator receives a timer event from the HUB.
(8A):汎用動作シミュレータは、タイマイベント伝達前までにHUBから受信したデータイベントに関するシミュレーション処理を含む仮想時間1ms分のシミュレーション処理実行を終了して、実行終了をHUBに通知する。(9A):HUBは実行終了通知を受け取ると、CPUシミュレータおよび汎用動作シミュレータに処理実行を指示する。(10A)(11A):、前記処理実行指示を受け取った各シミュレータは再び処理実行を開始する。 (8A): The general-purpose operation simulator ends the simulation process execution for 1 ms including the simulation process related to the data event received from the HUB before the timer event transmission, and notifies the HUB of the end of the execution. (9A): When the HUB receives the execution end notification, it instructs the CPU simulator and the general-purpose operation simulator to execute processing. (10A) (11A): Each simulator that receives the process execution instruction starts the process execution again.
(5B):また、ソフトウェアタイマ"TimerB"の値の変化が発生した場合も、ソフトウェアタイマ" TimerA"の値の変化が発生した場合と同様に処理が行われる。すなわち、(6B):HUBは、"TimerB"の値の変化でCPUシミュレータと連携動作する機構部品シミュレータにタイマイベントを伝達する。(7B):汎用動作シミュレータは、HUBからタイマイベントを伝達される。 (5B): Also, when a change in the value of the software timer “TimerB” occurs, processing is performed in the same manner as when a change in the value of the software timer “TimerA” occurs. That is, (6B): The HUB transmits a timer event to the mechanism component simulator that operates in cooperation with the CPU simulator by a change in the value of “TimerB”. (7B): The general-purpose operation simulator receives a timer event from the HUB.
(8B):機構部品シミュレータは、HUBから指示された仮想時間5ms分のシミュレーション処理実行を終えると、HUBに処理実行終了を通知する。(9B):HUBは、機構部品シミュレータから実行終了通知を受信すると、ソフトウェアタイマ"TimerB"で連携動作するシミュレータ(本例ではCPUシミュレータと機構部品シミュレータ)に対して処理実行を指示する。(10B)(11B):、前記処理実行指示を受け取った各シミュレータは再び処理実行を開始する。 (8B): When the simulation of the simulation process for the virtual time of 5 ms instructed by the HUB is completed, the mechanical component simulator notifies the HUB of the end of the process execution. (9B): When the HUB receives the execution end notification from the mechanical component simulator, the HUB instructs the simulator (the CPU simulator and the mechanical component simulator in this example) to perform processing in cooperation with the software timer “TimerB”. (10B) (11B): Each simulator that receives the process execution instruction starts the process execution again.
以上を繰り返すことで、周辺シミュレータは、それぞれ異なったソフトウェアタイマ値の変化をトリガとしてCPUシミュレータと連携動作を行い、シミュレーションシステムを連携動作させる。また、本例では、1つのタイマで1つの周辺シミュレータとCPUシミュレータとが連携動作するものであるが、1つのタイマで複数の周辺シミュレータとCPUシミュレータとが連携動作することもできる。 By repeating the above, the peripheral simulator performs a cooperative operation with the CPU simulator, triggered by changes in different software timer values, and causes the simulation system to perform a cooperative operation. In this example, one peripheral simulator and the CPU simulator operate in cooperation with one timer, but a plurality of peripheral simulators and the CPU simulator can operate in cooperation with one timer.
<実施形態3の効果>
上記のように、周辺シミュレータごとに異なるソフトウェアタイマ値の変化でCPUシミュレータと連携動作する。これにより、検証対象のソフトウェアが複数のソフトウェアタイマを使用して機器制御を行っている場合においても、検証対象ソフトウェアが使用するソフトウェアタイマごとにシミュレータを分割し、シミュレーションシステムを構成できる。従って、検証対象CPUを制御するターゲットソフトウェアに対して、ターゲットソフトウェアがCPU制御を行う単位ごとに各シミュレータを連携動作させることができる。結果として、シミュレーションの利用効率を下げることなく、シミュレーション精度を確保することができる。
<Effect of
As described above, the CPU simulator cooperates with a change in the software timer value that differs for each peripheral simulator. As a result, even when the verification target software uses a plurality of software timers to perform device control, the simulator can be divided for each software timer used by the verification target software to configure a simulation system. Accordingly, each simulator can be linked to the target software that controls the verification target CPU for each unit for which the target software performs CPU control. As a result, the simulation accuracy can be ensured without reducing the use efficiency of the simulation.
なお、本発明は、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。 The present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.
また、本発明は、前述した実施形態の各機能を実現するソフトウエアプログラムを、システム若しくは装置に対して直接または遠隔から供給することによっても達成される。そして、そのシステム等に含まれるコンピュータが該供給されたプログラムコードを読み出して実行する。 The present invention can also be achieved by supplying a software program for realizing the functions of the above-described embodiments directly or remotely to a system or apparatus. Then, a computer included in the system or the like reads and executes the supplied program code.
従って、本発明の機能・処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、上記機能・処理を実現するためのコンピュータプログラム自体も本発明の1つである。 Accordingly, since the functions and processes of the present invention are implemented by a computer, the program code itself installed in the computer also implements the present invention. That is, the computer program itself for realizing the functions and processes is also one aspect of the present invention.
その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RWなどがある。また、記録媒体としては、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM、DVD−R)などもある。 In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS. Examples of the recording medium for supplying the program include a flexible disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, and CD-RW. Examples of the recording medium include a magnetic tape, a non-volatile memory card, a ROM, and a DVD (DVD-ROM, DVD-R).
また、プログラムは、クライアントコンピュータのブラウザを用いてインターネット/イントラネットのウェブサイトからダウンロードしてもよい。すなわち、該ウェブサイトから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードしてもよいのである。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるウェブサイトからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明の構成要件となる場合がある。 The program may be downloaded from an Internet / intranet website using a browser of a client computer. That is, the computer program itself of the present invention or a compressed file including an automatic installation function may be downloaded from the website onto a recording medium such as a hard disk. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different website. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer may be a constituent requirement of the present invention.
また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配付してもよい。この場合、所定条件をクリアしたユーザにのみ、インターネット/イントラネットを介してウェブサイトから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報で暗号化されたプログラムを復号して実行し、プログラムをコンピュータにインストールしてもよい。 Further, the program of the present invention may be encrypted and stored in a storage medium such as a CD-ROM and distributed to users. In this case, only the user who has cleared the predetermined condition is allowed to download key information for decryption from the website via the Internet / intranet. Then, the program encrypted with the key information may be decrypted and executed, and the program may be installed in the computer.
また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現されてもよい。なお、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ってもよい。もちろん、この場合も、前述した実施形態の機能が実現され得る。 Further, the functions of the above-described embodiments may be realized by the computer executing the read program. Note that an OS or the like running on the computer may perform part or all of the actual processing based on the instructions of the program. Of course, also in this case, the functions of the above-described embodiments can be realized.
さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれてもよい。そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ってもよい。このようにして、前述した実施形態の機能が実現されることもある。 Furthermore, the program read from the recording medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Based on the instructions of the program, a CPU or the like provided in the function expansion board or function expansion unit may perform part or all of the actual processing. In this way, the functions of the above-described embodiments may be realized.
Claims (16)
前記CPUシミュレータが、前記CPUシミュレータが有するソフトウェアタイマの変化が発生すると、変化の発生を前記プロセス接続部に通知する工程と、
前記CPUシミュレータが、前記変化の発生を通知した後に、次ぎの前記CPUシミュレータへのシミュレーションの開始の指示が前記プロセス接続部からあるまでシミュレーションを停止する工程と、
前記プロセス接続部が、前記CPUシミュレータから前記ソフトウェアタイマの変化の発生の通知を受けて、前記ソフトウェアタイマの変化の発生を前記周辺シミュレータに通知する工程と、
前記周辺シミュレータが、前記プロセス接続部から前記CPUシミュレータのソフトウェアタイマの変化の発生を受信する工程と、
前記周辺シミュレータが、前記ソフトウェアタイマの変化の発生の受信後に、前記周辺シミュレータが前記ソフトウェアタイマの変化の時間に相当するシミュレーションを終了すると、該シミュレーションの終了を前記プロセス接続部に通知する工程と、
前記プロセス接続部が、前記周辺シミュレータの全てからシミュレーションの終了が通知されると、前記CPUシミュレータ及び前記周辺シミュレータにシミュレーションの開始を指示する工程とを有することを特徴とするシミュレーション方法。 Using a CPU simulator for simulating a CPU, at least one peripheral simulator for simulating a peripheral part to be controlled by the CPU, and a process connection part for realizing synchronization between the simulators, A simulation method for executing a simulation while synchronizing a CPU simulator and at least one peripheral simulator,
The CPU simulator, when a change in the software timer of the CPU simulator occurs, notifying the process connection unit of the occurrence of the change;
After the CPU simulator notifies the occurrence of the change, stopping the simulation until the next instruction to start the simulation to the CPU simulator is from the process connection unit;
The process connection unit receives notification of the occurrence of a change in the software timer from the CPU simulator and notifies the peripheral simulator of the occurrence of a change in the software timer;
The peripheral simulator receiving the occurrence of a change in the software timer of the CPU simulator from the process connection;
When the peripheral simulator finishes the simulation corresponding to the time of the software timer change after receiving the occurrence of the change of the software timer, the step of notifying the end of the simulation to the process connection unit,
And a step of instructing the CPU simulator and the peripheral simulator to start the simulation when the process connection unit is notified of the end of the simulation from all of the peripheral simulators.
前記プロセス接続部が、前記ソフトウェアタイマの変化の時間を前記CPUシミュレータに通知する工程とを更に有することを特徴とする請求項1に記載のシミュレーション方法。 The process connection unit accepting and storing an input of a change time of a software timer of the CPU simulator;
The simulation method according to claim 1, further comprising: a step of notifying the CPU simulator of a change time of the software timer.
前記プロセス接続部が、前記複数のソフトウェアタイマのいずれを前記CPUシミュレータが使用するかを判断する工程と、
前記プロセス接続部が、判断された前記ソフトウェアタイマの変化の時間を前記CPUシミュレータに通知する工程とを更に有することを特徴とする請求項1に記載のシミュレーション方法。 The process connection unit receiving and storing input of different change times of the plurality of software timers of the CPU simulator;
The process connection unit determining which of the plurality of software timers the CPU simulator uses;
The simulation method according to claim 1, further comprising a step of notifying the CPU simulator of the determined change time of the software timer.
前記プロセス接続部が、前記複数のソフトウェアタイマの異なる変化の時間と、前記複数のソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報とを、前記CPUシミュレータに通知する工程と、
前記プロセス接続部が、前記CPUシミュレータから、前記ソフトウェアタイマの変化の発生と当該ソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報との通知を受けて、前記ソフトウェアタイマの変化の発生を前記対象の周辺シミュレータに通知する工程とを有し、
前記CPUシミュレータが、前記変化の発生を前記プロセス接続部に通知する工程では、ソフトウェアタイマの変化の発生と共に、当該ソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報を前記プロセス接続部に通知することを特徴とする請求項1に記載のシミュレーション方法。 The process connection unit accepts and stores input of different change times of the plurality of software timers of the CPU simulator and information indicating a peripheral simulator to be used for synchronization of the plurality of software timers. When,
The process connection unit notifying the CPU simulator of different change times of the plurality of software timers and information indicating a peripheral simulator to be used for synchronization of the plurality of software timers;
The process connection unit receives notification from the CPU simulator of the occurrence of the change of the software timer and the information indicating the peripheral simulator to be used for synchronization of the software timer, and the occurrence of the change of the software timer. And notifying the surrounding simulator of the target,
In the step of notifying the process connection unit of the occurrence of the change, the CPU simulator includes information indicating a peripheral simulator to be used for synchronization along with the occurrence of the change of the software timer. The simulation method according to claim 1, wherein notification is performed.
前記CPUシミュレータが、
前記CPUシミュレータが有するソフトウェアタイマの変化が発生すると、変化の発生を前記プロセス接続部に通知する手段と、
前記変化の発生を通知した後に、次ぎの前記CPUシミュレータへのシミュレーションの開始の指示が前記プロセス接続部からあるまでシミュレーションを停止する手段とを有し、
前記周辺シミュレータが、
前記プロセス接続部から前記CPUシミュレータのソフトウェアタイマの変化の発生を受信する手段と、
前記ソフトウェアタイマの変化の発生の受信後に、前記周辺シミュレータが前記ソフトウェアタイマの変化の時間に相当するシミュレーションを終了すると、該シミュレーションの終了を前記プロセス接続部に通知する手段とを有し、
前記プロセス接続部が、
前記CPUシミュレータから前記ソフトウェアタイマの変化の発生の通知を受けて、前記ソフトウェアタイマの変化の発生を前記周辺シミュレータに通知する手段と、
前記周辺シミュレータの全てからシミュレーションの終了が通知されると、前記CPUシミュレータ及び前記周辺シミュレータにシミュレーションの開始を指示する手段とを有することを特徴とするシミュレーションシステム。 A CPU simulator for simulating a CPU, at least one peripheral simulator for simulating a peripheral part to be controlled by the CPU, and a process connection part for realizing synchronization between the simulators, A simulation system for executing a simulation while synchronizing a CPU simulator and at least one peripheral simulator,
The CPU simulator is
When a change in the software timer included in the CPU simulator occurs, means for notifying the process connection unit of the occurrence of the change;
After notifying the occurrence of the change, means for stopping the simulation until the next instruction to start the simulation to the CPU simulator is from the process connection unit,
The peripheral simulator is
Means for receiving the occurrence of a change in the software timer of the CPU simulator from the process connection;
Means for notifying the process connection unit of the end of the simulation when the peripheral simulator ends the simulation corresponding to the time of the change of the software timer after receiving the occurrence of the change of the software timer;
The process connection is
Means for notifying the peripheral simulator of the occurrence of a change in the software timer upon receiving a notification of the occurrence of the change in the software timer from the CPU simulator;
A simulation system comprising: a CPU simulator and a means for instructing the peripheral simulator to start a simulation when the end of simulation is notified from all of the peripheral simulators.
前記CPUシミュレータが有するソフトウェアタイマの変化の時間の入力を受け付けて記憶する手段と、
前記ソフトウェアタイマの変化の時間を前記CPUシミュレータに通知する手段とを更に有することを特徴とする請求項10に記載のシミュレーションシステム。 The process connection is
Means for receiving and storing an input of a change time of a software timer included in the CPU simulator;
The simulation system according to claim 10, further comprising means for notifying the CPU simulator of a change time of the software timer.
前記CPUシミュレータが有する複数のソフトウェアタイマの異なる変化の時間の入力を受け付けて記憶する手段と、
前記複数のソフトウェアタイマのいずれを前記CPUシミュレータが使用するかを判断する手段と、
判断された前記ソフトウェアタイマの変化の時間を前記CPUシミュレータに通知する手段とを更に有することを特徴とする請求項10に記載のシミュレーションシステム。 The process connection is
Means for receiving and storing input of different change times of a plurality of software timers of the CPU simulator;
Means for determining which of the plurality of software timers the CPU simulator uses;
The simulation system according to claim 10, further comprising means for notifying the CPU simulator of the determined change time of the software timer.
前記CPUシミュレータが有する複数のソフトウェアタイマの異なる変化の時間と、前記複数のソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報との入力を受け付けて記憶する手段と、
前記複数のソフトウェアタイマの異なる変化の時間と、前記複数のソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報とを、前記CPUシミュレータに通知する手段と、
前記CPUシミュレータから、前記ソフトウェアタイマの変化の発生と当該ソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報との通知を受けて、前記ソフトウェアタイマの変化の発生を前記対象の周辺シミュレータに通知する手段とを更に有し、
前記CPUシミュレータの前記変化の発生を前記プロセス接続部に通知する手段は、ソフトウェアタイマの変化の発生と共に、当該ソフトウェアタイマを同期のために使用する対象の周辺シミュレータを示す情報を前記プロセス接続部に通知することを特徴とする請求項10に記載のシミュレーションシステム。 The process connection is
Means for accepting and storing input of different times of change of the plurality of software timers of the CPU simulator and information indicating a peripheral simulator to be used for synchronization of the plurality of software timers;
Means for notifying the CPU simulator of different change times of the plurality of software timers and information indicating a peripheral simulator to be used for synchronization of the plurality of software timers;
Upon receiving notification from the CPU simulator of the occurrence of the change in the software timer and the information indicating the target peripheral simulator that uses the software timer for synchronization, the occurrence of the change in the software timer is detected by the target peripheral simulator. And a means for notifying
The means for notifying the process connection unit of the occurrence of the change of the CPU simulator is configured to notify the process connection unit of information indicating a peripheral simulator to be used for synchronization with the occurrence of the change of the software timer. The simulation system according to claim 10, wherein notification is performed.
アクチュエータとセンサを含む複数の部品からなる機械装置の機構モデルと、当該機構モデルの間の干渉及び連携と、前記アクチュエータとセンサに接続される信号とをコンピュータシステムで定義し、外部から入力されたアクチュエータ動作信号として定義された情報に対応したアクチュエータの動作と機構部品間の干渉及び連携の定義に従って、関連する全ての機構部品の動作をコンピュータシステムの表示装置に画像として再現するとともに、前記機構モデルの動作の結果を、前記センサとして定義された機構モデルに対するあらかじめ定義された動作に応じてセンサ信号として定義された情報を外部に出力する1つ以上の機構部品シミュレータと、
前記シミュレーションの対象装置の構成物で、前記CPUシミュレータ及び前記機構部品シミュレータで対応していない構成物の動作と、前記対象装置に対する外部からの働きかけを擬似的に再現する機能と、シミュレーションの結果の解析、表示及び保存する機能と、シミュレーションのためのユーザインタフェースをする機能とを備えた1つ以上のシミュレータと、
前記シミュレーションにおけるシミュレータを接続して、1つの機器制御シミュレーションシステムとして動作させるプロセス接続手段とを含み、
前記プロセス接続手段は、検証対象のCPUのプログラムが自身で作り出しているタイマの変化をトリガとしてシミュレータ間の連携を行い、前記タイマの変化を1単位として仮想時刻を進め、該仮想時刻により前記各種のシミュレータ間の同期処理を行う連携動作モジュールを有することを特徴とするシミュレーションシステム。 The operation of the mechanical device is simulated by a computer system, and in accordance with a CPU control program mounted on the device to be simulated, information on the virtual input terminal defined corresponding to the CPU terminal of the target device is read. One or more CPU simulators that simulate the operation of the CPU of the target device by controlling the virtual output terminal;
A mechanism model of a mechanical device composed of a plurality of parts including an actuator and a sensor, interference and cooperation between the mechanism models, and a signal connected to the actuator and the sensor are defined by a computer system and input from the outside. In accordance with the definition of the actuator operation corresponding to the information defined as the actuator operation signal and the interference and linkage between the mechanical components, the operation of all related mechanical components is reproduced as an image on the display device of the computer system, and the mechanism model One or more mechanism component simulators that output information defined as sensor signals to the outside in response to a predefined action for the mechanism model defined as the sensor;
The simulation target device is a component that is not supported by the CPU simulator and the mechanical component simulator, a function that simulates an external action on the target device, and a simulation result One or more simulators having a function to analyze, display and save, and a function to provide a user interface for simulation;
Process connection means for connecting a simulator in the simulation and operating as a device control simulation system,
The process connection means cooperates between simulators triggered by a change in a timer created by the CPU program to be verified as a trigger, advances a virtual time with the change in the timer as one unit, and the various times are determined according to the virtual time. A simulation system comprising a cooperative operation module for performing synchronization processing between simulators.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008305625A JP2010128987A (en) | 2008-11-28 | 2008-11-28 | Simulation method and system of the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008305625A JP2010128987A (en) | 2008-11-28 | 2008-11-28 | Simulation method and system of the same |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010128987A true JP2010128987A (en) | 2010-06-10 |
JP2010128987A5 JP2010128987A5 (en) | 2012-01-19 |
Family
ID=42329306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008305625A Pending JP2010128987A (en) | 2008-11-28 | 2008-11-28 | Simulation method and system of the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010128987A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014029639A (en) * | 2012-07-31 | 2014-02-13 | Canon Inc | Information processing apparatus and information processing method |
JP2017062297A (en) * | 2015-09-24 | 2017-03-30 | 株式会社東芝 | Simulation device, module thereof, simulation method, and program |
JP2019032788A (en) * | 2017-08-10 | 2019-02-28 | オムロン株式会社 | Information processing apparatus, information processing method, and information processing program |
JP2019032789A (en) * | 2017-08-10 | 2019-02-28 | オムロン株式会社 | Information processing apparatus, information processing method, and information processing program |
CN109543349B (en) * | 2018-12-21 | 2023-10-24 | 核动力运行研究所 | Multi-plug-in integration method for nuclear power simulator |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11327956A (en) * | 1998-05-20 | 1999-11-30 | Oki Electric Ind Co Ltd | Software debugging device |
JP2006107370A (en) * | 2004-10-08 | 2006-04-20 | Canon Inc | Information processing apparatus and its control method |
JP2006172128A (en) * | 2004-12-15 | 2006-06-29 | Canon Inc | Processing method and information processing device for program cooperation system |
JP2008250788A (en) * | 2007-03-30 | 2008-10-16 | Fujitsu Ltd | Cooperation simulation system |
-
2008
- 2008-11-28 JP JP2008305625A patent/JP2010128987A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11327956A (en) * | 1998-05-20 | 1999-11-30 | Oki Electric Ind Co Ltd | Software debugging device |
JP2006107370A (en) * | 2004-10-08 | 2006-04-20 | Canon Inc | Information processing apparatus and its control method |
JP2006172128A (en) * | 2004-12-15 | 2006-06-29 | Canon Inc | Processing method and information processing device for program cooperation system |
JP2008250788A (en) * | 2007-03-30 | 2008-10-16 | Fujitsu Ltd | Cooperation simulation system |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014029639A (en) * | 2012-07-31 | 2014-02-13 | Canon Inc | Information processing apparatus and information processing method |
JP2017062297A (en) * | 2015-09-24 | 2017-03-30 | 株式会社東芝 | Simulation device, module thereof, simulation method, and program |
JP2019032788A (en) * | 2017-08-10 | 2019-02-28 | オムロン株式会社 | Information processing apparatus, information processing method, and information processing program |
JP2019032789A (en) * | 2017-08-10 | 2019-02-28 | オムロン株式会社 | Information processing apparatus, information processing method, and information processing program |
JP7052250B2 (en) | 2017-08-10 | 2022-04-12 | オムロン株式会社 | Information processing equipment, information processing methods, and information processing programs |
CN109543349B (en) * | 2018-12-21 | 2023-10-24 | 核动力运行研究所 | Multi-plug-in integration method for nuclear power simulator |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Karsai et al. | Design guidelines for domain specific languages | |
US20140026115A1 (en) | Web development environment that enables a devel0per to interact with run-time output presentation of a page | |
US8356277B1 (en) | System and method for freezing operation of dynamic code of a run-time web page | |
JP2010128987A (en) | Simulation method and system of the same | |
JP2013191129A (en) | Information processing apparatus, simulation method, and program | |
JP2005339029A (en) | Program cooperation system | |
JP5314959B2 (en) | Information processing apparatus, control method therefor, computer program, and storage medium | |
JP4986508B2 (en) | Simulator apparatus and computer program | |
US20200257740A1 (en) | Methods and systems for generating and manipulating electronic vehicle checklists using web-based editing tool | |
JP4875545B2 (en) | Simulation synchronization apparatus and control method thereof | |
CN102640126A (en) | Management apparatus and method therefor | |
JP2006172128A (en) | Processing method and information processing device for program cooperation system | |
JP5693668B2 (en) | Information processing apparatus, control method therefor, computer program, and storage medium | |
Erkkinen et al. | Automatic code generation-technology adoption lessons learned from commercial vehicle case studies | |
US20210141710A1 (en) | Development support device | |
Dohmen et al. | Experiences and lessons learned using UML-RT to develop embedded printer software | |
JP5162531B2 (en) | Simulation support method, storage medium storing simulation support program, and simulation support apparatus | |
Hoogervorst et al. | VIKI—more than a GUI for ROS | |
US20220229622A1 (en) | Information processing apparatus, control method of information processing apparatus, and storage medium | |
JP2009288954A (en) | Actual machine simulation data simulator device | |
US20230186019A1 (en) | Ai-based language testing process for ci/cd | |
Fayollas et al. | A Generic Approach for Assessing Compatibility Between Task Descriptions and Interactive Systems: Application to the Effectiveness of a Flight Control Unit | |
JP6652724B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
JP2006215907A (en) | Image processing system | |
Yarrow et al. | Production-Level Distributed Parametric Study Capabilities for the Grid |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111128 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111128 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130130 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130215 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130805 |