[go: up one dir, main page]

JP5066013B2 - Simulation apparatus and program - Google Patents

Simulation apparatus and program Download PDF

Info

Publication number
JP5066013B2
JP5066013B2 JP2008164553A JP2008164553A JP5066013B2 JP 5066013 B2 JP5066013 B2 JP 5066013B2 JP 2008164553 A JP2008164553 A JP 2008164553A JP 2008164553 A JP2008164553 A JP 2008164553A JP 5066013 B2 JP5066013 B2 JP 5066013B2
Authority
JP
Japan
Prior art keywords
time
simulation
model
scheduler
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.)
Expired - Fee Related
Application number
JP2008164553A
Other languages
Japanese (ja)
Other versions
JP2010009113A (en
Inventor
喜則 坂本
祐教 松本
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.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2008164553A priority Critical patent/JP5066013B2/en
Publication of JP2010009113A publication Critical patent/JP2010009113A/en
Application granted granted Critical
Publication of JP5066013B2 publication Critical patent/JP5066013B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、ハードウェアモデル及びソフトウェアモデルを協調検証するシミュレーション装置において、ゼロ遅延の無限ループを検出でき、この無限ループの検出時には、シミュレーションを先に進めることができるシミュレーション装置およびプログラムに関する。   The present invention relates to a simulation apparatus and a program that can detect a zero-definite infinite loop in a simulation apparatus that collaboratively verifies a hardware model and a software model, and that can advance the simulation when the infinite loop is detected.

プロセッサを含むハードウェアモデルと、その上で動作するソフトウェアモデルで構成されるシステムの開発及び検証がシミュレーション装置を用いて行われている。このシミュレーション装置としては、検証対象システム上のハードウェアモデルをCベース言語のシステムレベル設計言語で記述したハードウェアモデルと、ターゲットプロセッサ上で動作するソフトウェアモデルとを並列動作(協調動作)させて検証(協調検証)するシミュレーション装置があった。   Development and verification of a system including a hardware model including a processor and a software model operating on the hardware model is performed using a simulation apparatus. As this simulation device, a hardware model in which a hardware model on a verification target system is described in a system level design language of C-based language and a software model that operates on a target processor are operated in parallel (cooperative operation) for verification. There was a simulation device (cooperative verification).

このようなシミュレーション装置において、ソフトウェアモデルの無限ループの発生を検出する方法としては、発振するループ回路を検出する方法(たとえば、下記特許文献1参照。)、ポーリング時に値の参照とシミュレーション実行権の開放を組合せることによりソフトウェアモデルのポーリング動作を模擬する方法(たとえば、下記特許文献2参照。)、状態遷移の閉ループを検出して、経路網羅率を測定するシミュレータ(たとえば、下記特許文献3参照。)、無条件分岐と、分岐先アドレスを判定し、無限セルフループの発生を判定するシステム監視装置(たとえば、下記特許文献4参照。)、複数の処理毎に所定の期間内に処理が実行されたかどうかを監視し、複数の処理のうちいずれかの処理が所定の時間から外れて実行された時に、ソフトウェアモデルの異常を検出するソフトウェアモデル監視回路(たとえば、下記特許文献5参照。)、同一アドレスを同一時間間隔で所定回数繰り返し実行したことを検出して、暴走検出を行う方法(たとえば、下記特許文献6参照。)などがある。   In such a simulation apparatus, as a method of detecting the occurrence of an infinite loop of the software model, a method of detecting an oscillating loop circuit (for example, refer to Patent Document 1 below), a reference of values at the time of polling, and a simulation execution right A method of simulating a polling operation of a software model by combining the opening (for example, see Patent Document 2 below), a simulator for detecting a closed loop of a state transition and measuring a route coverage rate (for example, see Patent Document 3 below) .), A system monitoring device that determines unconditional branching and branch destination addresses and determines the occurrence of an infinite self-loop (for example, see Patent Document 4 below), and processing is executed within a predetermined period for each of a plurality of processings And one of the multiple processes is executed outside the predetermined time. Sometimes, a software model monitoring circuit (for example, see Patent Document 5 below) for detecting an abnormality of the software model, a method of detecting runaway detection by repeating the same address at a predetermined time interval and performing runaway detection (for example, (See Patent Document 6 below).

このほか、あるタスク内の処理が論理的異常またはハードウェアモデル異常により無限ループに陥った場合に、1.動作中のタスクを判別し、2.判別されたタスクの動作アドレスを検出し、3.検出されたアドレスが規定範囲内の変化しかない(タスクが動いていない)ことを判定し、4.この判定により異常状態を認識し、5.該異常状態を認識した場合、そのタスクの動作アドレスをタスクの先頭に変更するリスタート機能と、を有する異常検出方法(たとえば、下記特許文献7参照。)がある。   In addition, when a process in a task falls into an infinite loop due to a logical abnormality or a hardware model abnormality, 1. Identify the task that is running, 2. detect the operation address of the determined task; 3. Determine that the detected address has only changed within the specified range (task is not moving); 4. An abnormal state is recognized by this determination. There is an abnormality detection method (see, for example, Patent Document 7 below) having a restart function for changing the operation address of the task to the head of the task when the abnormal state is recognized.

特開2002−169852号公報JP 2002-169852 A 特開2005−018623号公報JP 2005-018623 A 特開平06−004616号公報Japanese Patent Laid-Open No. 06-004616 特開2000−250785号公報JP 2000-250785 A 特開2000−010824号公報JP 2000-010824 A 特開平10−161908号公報JP-A-10-161908 特開平05−241872号公報JP 05-241872 A

しかしながら、上記各特許文献に記載された技術では、下記のような問題があった。
1.協調動作を検証すべく、ソフトウェアモデルをアンタイムド(Untimed)で高速に動作させた場合を考える。ここで、以下に説明するソフトウェアモデルとは、たとえば、Cベース言語で記述されたソフトウェアモデル(アンタイムド)であり、ハードウェアモデルとは、Cベースのシステムレベル設計言語記述のモデル(タイムド:Timed)である。以下の説明では、ソフトウェアモデルとハードウェアモデルを、それぞれソフトウェア、ハードウェアとも呼称する。
However, the techniques described in the above patent documents have the following problems.
1. Consider a case where the software model is operated at high speed in an untimed manner to verify the cooperative operation. Here, the software model described below is, for example, a software model (untimed) described in a C-based language, and the hardware model is a C-based system level design language description model (timed). It is. In the following description, the software model and the hardware model are also referred to as software and hardware, respectively.

この場合、システム上では処理時間の経過とともにシステム上のハードウェアモデルの状態が変化するが、シミュレーション時のソフトウェアモデルがアンタイムドであるために処理時間がゼロとなり、無限ループが生じる場合がある。上記のアンタイムドは、シミュレーション時に処理遅延時間を持たないモデルである。   In this case, although the state of the hardware model on the system changes as the processing time elapses on the system, the processing time becomes zero because the software model at the time of simulation is untimed, and an infinite loop may occur. The above untimed is a model having no processing delay time during simulation.

2.シミュレーション装置により、ソフトウェアモデルをアンタイムドで高速に動作させる場合、上述のように、そもそもシミュレーション時のソフトウェアモデルの処理時間がゼロであるため、ソフトウェアモデルの処理時間を監視しても、無限ループを検出することができない。
3.ハードウェアモデルのシミュレーション時においても、ハードウェアモデルのバグにより無限ループが起こり得る。
2. When operating a software model untimed and at high speed with a simulation device, the software model processing time during simulation is zero as described above, so even if the software model processing time is monitored, an infinite loop is detected. Can not do it.
3. Even during simulation of the hardware model, an infinite loop can occur due to a bug in the hardware model.

4.同一アドレスを同一時間間隔で所定回数繰り返し実行したことを検出する方法(たとえば、上記特許文献6参照。)を適用したとしても、そもそもシミュレーション時のソフトウェアモデルの処理時間がゼロであるため無限ループを検出することができない。
5.複数のタスクを含むような大きな無限ループの場合、ゼロ遅延の無限ループが検出されたとしても無限ループの原因解析を容易には行えない。
6.無限ループ検出のために分岐アドレス等の実行状態をモニタすると、問題の無い部分のシミュレーション速度が低下する。
7.無限ループ解析のために実行状態を、たとえばファイル等に出力する処理を行うと、シミュレーション速度が著しく低下する。
4). Even if a method of detecting that the same address is repeatedly executed at the same time interval a predetermined number of times (see, for example, Patent Document 6 above) is applied, an infinite loop is created because the processing time of the software model at the time of simulation is zero. It cannot be detected.
5. In the case of a large infinite loop including a plurality of tasks, even if a zero delay infinite loop is detected, the cause analysis of the infinite loop cannot be easily performed.
6). If the execution state such as a branch address is monitored for infinite loop detection, the simulation speed of a problem-free portion is reduced.
7). If the process of outputting the execution state to, for example, a file for infinite loop analysis is performed, the simulation speed is significantly reduced.

開示のシミュレーション装置およびプログラムは、上記の問題点を解決するものであり、処理遅延時間を持たないアンタイムドのソフトウェアモデルと、ハードウェアモデルとの協調検証時に、ソフトウェアモデルに処理遅延時間ゼロの無限ループが発生してもシミュレーションが進まなくなる事態を防ぎ、シミュレーションの継続を遂行できることを目的とする。   The disclosed simulation apparatus and program solve the above-mentioned problems, and an infinite loop with zero processing delay time is included in the software model when collaborating with an untimed software model that does not have processing delay time and a hardware model. The purpose is to prevent the situation where the simulation does not proceed even if the occurrence of the error occurs and to continue the simulation.

開示のシミュレーション装置およびプログラムは、ターゲットプロセッサ上で動作するソフトウェアモデルと、ハードウェアモデルとの協調動作を検証するシミュレーション装置において、前記ハードウェアモデルの実行スケジューリングを行うスケジューラと、前記ソフトウェアモデルの処理時間を検証用プラットフォームにおける検証時刻から算出するタイマと、前記タイマの値に基づき、予め設定されたタイマ間隔でシミュレーション時刻を監視し、当該シミュレーション時刻に変化がないことにより処理遅延時間を持たないソフトウェアモデルの無限ループを検出する監視手段と、を備え、前記スケジューラは、前記監視手段による前記無限ループの検出により、前記ソフトウェアモデルの実行を停止させることを要件とする。   The disclosed simulation apparatus and program include a software model that operates on a target processor and a simulation apparatus that verifies the cooperative operation between the hardware model, a scheduler that performs execution scheduling of the hardware model, and a processing time of the software model A software model that monitors the simulation time at a preset timer interval based on the timer value calculated from the verification time in the verification platform, and has no processing delay time due to no change in the simulation time Monitoring means for detecting the infinite loop, and the scheduler is required to stop the execution of the software model when the monitoring means detects the infinite loop.

上記構成によれば、スケジューラは、検証用プラットフォーム上のCPU時間を計測するタイマに基づくシミュレーション時間の監視装置を備える。シミュレーションの実行を制御するスケジューラは、設定されたタイマ間隔でシミュレーション時刻を監視する。このタイマ間隔の間、シミュレーション時刻が以前の値から変化しない場合、スケジューラは、無限ループとして検出し、ソフトウェアモデルの実行を停止させる。また、タイムドのモデルの次のタイム・イベントまでターゲット時刻を進めることができる。   According to the above configuration, the scheduler includes the simulation time monitoring device based on the timer that measures the CPU time on the verification platform. The scheduler that controls the execution of the simulation monitors the simulation time at a set timer interval. If the simulation time does not change from the previous value during this timer interval, the scheduler detects it as an infinite loop and stops the execution of the software model. Also, the target time can be advanced to the next time event of the timed model.

開示のシミュレーション装置およびプログラムによれば、ソフトウェアモデルのアンタイムドのシミュレーションで発生するゼロ遅延の無限ループを検出できるようになるという効果を奏する。また、ゼロ遅延の無限ループがあったソフトウェアモデルの実行を停止させ、次のモデルの実行が行えるようになり、シミュレーションの実行を遂行できるようになるという効果を奏する。   According to the disclosed simulation apparatus and program, it is possible to detect an infinite loop of zero delay that occurs in an untimed simulation of a software model. Also, the execution of the software model having an infinite loop with zero delay is stopped, the next model can be executed, and the simulation can be executed.

以下に添付図面を参照して、この発明にかかるシミュレーション装置およびプログラムの好適な実施の形態を詳細に説明する。   Exemplary embodiments of a simulation apparatus and a program according to the present invention will be described below in detail with reference to the accompanying drawings.

(実施の形態1)
(シミュレーション装置の概要構成)
図1は、この発明のシミュレーション装置の構成を示す図である。実施の形態1のシミュレーション装置1は、検証用プラットフォーム10と、検証用プラットフォーム10上で動作するアプリケーションであり、シミュレーションの実行を制御するスケジューラ20とにより構成される。
(Embodiment 1)
(Outline configuration of simulation device)
FIG. 1 is a diagram showing a configuration of a simulation apparatus according to the present invention. The simulation apparatus 1 according to the first embodiment includes a verification platform 10 and a scheduler 20 that is an application operating on the verification platform 10 and controls execution of the simulation.

このシミュレーション装置1は、ターゲットプロセッサ上(不図示)で動作するモデルであるソフトウェアモデルSWと、ハードウェアモデルHWとの協調動作を検証する。ソフトウェアモデルSWは、SystemCなどのCベース言語で記述されたアンタイムドのソフトウェア部品である。ハードウェアモデルHWは、ターゲットシステム(不図示)のハードウェアモデルをSystemCなどのシステムレベル設計言語(タイムド)で記述したものである。   The simulation apparatus 1 verifies the cooperative operation between the software model SW, which is a model that operates on a target processor (not shown), and the hardware model HW. The software model SW is an untimed software component described in a C-based language such as SystemC. The hardware model HW describes a hardware model of a target system (not shown) in a system level design language (timed) such as SystemC.

スケジューラ20は、ソフトウェアモデルSWと、ハードウェアモデルHWの実行スケジューリングを行う。具体的には、ソフトウェアモデルSWと、ハードウェアモデルHWの評価タイミングを、イベント・ドリブン(またはタイミング・ドリブンともいう)でスケジューリングする。   The scheduler 20 performs execution scheduling of the software model SW and the hardware model HW. Specifically, the evaluation timing of the software model SW and the hardware model HW is scheduled by event-driven (or also timing-driven).

このスケジューラ20は、スケジュールの進行を監視する監視手段22を備えている。監視手段22は、検証用プラットフォーム10上の検証時刻(CPU時間)11を計測するタイマ21と、ターゲット時刻監視部23とを有している。タイマ21により仮想的なソフトウェアモデルの処理時間を得るもので無限ループ監視用タイマとして用いられる。ターゲット時刻監視部23は、タイマ21に基づいて予め設定した時間間隔で、ターゲット時刻(シミュレーション時刻)tを監視する。   The scheduler 20 includes monitoring means 22 for monitoring the progress of the schedule. The monitoring unit 22 includes a timer 21 that measures the verification time (CPU time) 11 on the verification platform 10 and a target time monitoring unit 23. The timer 21 obtains a virtual software model processing time and is used as an infinite loop monitoring timer. The target time monitoring unit 23 monitors the target time (simulation time) t at a time interval set in advance based on the timer 21.

そして、ターゲット時刻監視部23は、ターゲット時刻(シミュレーション時刻)tが以前の値から変化しない場合、ゼロ遅延の無限ループが発生したことを検出する。ターゲット時刻監視部23によるゼロ遅延の無限ループを検出すると、スケジューラ20は、ターゲット時刻(シミュレーション時刻)tを次のタイム・イベントまで進める。また、スケジューラ20は、ログ出力制御手段を備え、無限ループが検出された場合にログ出力制御を有効にすることができる。ログ出力を行う場合には、ログ出力に必要な時間相当で設定されたタイマ間隔の間、アンタイムドモデルの状態トレース情報を出力することができる。   When the target time (simulation time) t does not change from the previous value, the target time monitoring unit 23 detects that an infinite loop with zero delay has occurred. When the target time monitoring unit 23 detects an infinite loop with zero delay, the scheduler 20 advances the target time (simulation time) t to the next time event. The scheduler 20 includes log output control means, and can enable log output control when an infinite loop is detected. When log output is performed, the state trace information of the untimed model can be output during a timer interval set corresponding to the time required for log output.

なお、イベントとは、例えば、ソフトウェアモデルもしくはハードウェアモデルにおける所定処理の終了通知等の通知処理の意味を含む。さらに、タイム・イベントとは、例えば、ソフトウェアモデルからソフトウェアモデルに対する、ソフトウェアモデルからハードウェアモデルに対する、ハードウェアモデルからハードウェアモデルに対する、もしくはハードウェアモデルからソフトウェアモデルに対するイベントの時刻の意味を含む。さらに、イベントタイムキューとは、例えば、タイム・イベントまでイベントを待たせることの意味を含む。   The event includes the meaning of notification processing such as notification of completion of predetermined processing in the software model or hardware model, for example. Furthermore, the time event includes, for example, the meaning of the time of the event from the software model to the software model, from the software model to the hardware model, from the hardware model to the hardware model, or from the hardware model to the software model. Furthermore, the event time queue includes, for example, the meaning of waiting for an event until a time event.

タイマ21は、一定時間ごとに検証時刻11を計測するカウンタをカウントアップし、カウンタの値が基準値以上になった場合、スケジューラ20に対して、割り込み要求を出力する。また、検証時刻カウンタをリセットする(0にする)機能を持つ。   The timer 21 counts up a counter that measures the verification time 11 at regular intervals, and outputs an interrupt request to the scheduler 20 when the counter value becomes equal to or greater than a reference value. It also has a function of resetting the verification time counter (to 0).

上記のスケジューラ20は、1.モデル(SWまたはHW)実行中に、割り込みが入った場合は、モデル実行を一時停止し、ターゲット時間を進める機能を有する。2.ターゲット時間を進めるときに、タイマ21のカウント値をリセットする。   The scheduler 20 is as follows. If an interrupt occurs during execution of the model (SW or HW), the model execution is suspended and the target time is advanced. 2. When the target time is advanced, the count value of the timer 21 is reset.

(シミュレーション装置のハードウェア構成)
つぎに、シミュレーション装置のハードウェア構成について説明する。図2は、シミュレーション装置のハードウェア構成を示す説明図である。図1に示したシミュレーション装置1は、たとえばパーソナルコンピュータ(PC)と、その周辺装置によって構成できる。
(Hardware configuration of simulation device)
Next, the hardware configuration of the simulation apparatus will be described. FIG. 2 is an explanatory diagram illustrating a hardware configuration of the simulation apparatus. The simulation apparatus 1 shown in FIG. 1 can be constituted by, for example, a personal computer (PC) and its peripheral devices.

図2において、シミュレーション装置1は、コンピュータ本体210と、入力装置220と、出力装置230と、から構成されており、不図示のルータやモデムを介してLAN,WANやインターネットなどのネットワーク240に接続可能である。   In FIG. 2, the simulation apparatus 1 includes a computer main body 210, an input device 220, and an output device 230, and is connected to a network 240 such as a LAN, WAN, or the Internet via a router or a modem (not shown). Is possible.

コンピュータ本体210は、CPU,メモリ,インターフェースを有する。CPUは、シミュレーション装置1の全体の制御を司る。メモリは、ROM,RAM,HD,光ディスク211,フラッシュメモリから構成される。メモリは、CPUのワークエリアとして使用される。   The computer main body 210 has a CPU, a memory, and an interface. The CPU controls the entire simulation apparatus 1. The memory is composed of ROM, RAM, HD, optical disk 211, and flash memory. The memory is used as a work area for the CPU.

また、メモリには、各種プログラムが格納されており、CPUからの命令に応じてロードされる。HDおよび光ディスク211は、ディスクドライブによりデータのリード/ライトが制御される。また、光ディスク211およびフラッシュメモリは、コンピュータ本体210に対して着脱自在である。インターフェースは、入力装置220からの入力、出力装置230からの出力、ネットワーク240に対する送受信の制御をおこなう。   Various programs are stored in the memory, and loaded according to instructions from the CPU. In the HD and the optical disk 211, reading / writing of data is controlled by a disk drive. The optical disk 211 and the flash memory are detachable from the computer main body 210. The interface controls input from the input device 220, output from the output device 230, and transmission / reception with respect to the network 240.

また、入力装置220としては、キーボード221、マウス222、スキャナ223などがある。キーボード221は、文字、数字、各種指示などの入力のためのキーを備え、データの入力をおこなう。また、タッチパネル式であってもよい。マウス222は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などをおこなう。スキャナ223は、画像を光学的に読み取る。読み取られた画像は画像データとして取り込まれ、コンピュータ本体210内のメモリに格納される。なお、スキャナ223にOCR機能を持たせてもよい。   The input device 220 includes a keyboard 221, a mouse 222, a scanner 223, and the like. The keyboard 221 includes keys for inputting characters, numbers, various instructions, and the like, and inputs data. Further, it may be a touch panel type. The mouse 222 performs cursor movement, range selection, window movement, size change, and the like. The scanner 223 optically reads an image. The read image is captured as image data and stored in a memory in the computer main body 210. Note that the scanner 223 may have an OCR function.

また、出力装置230としては、ディスプレイ231、プリンタ232、スピーカ233などがある。ディスプレイ231は、カーソル、アイコン、あるいはツールボックスなどをはじめ、文書、画像、機能情報などのデータを表示する。また、プリンタ232は、画像データや文書データを印刷する。また、スピーカ233は、効果音や読み上げ音などの音声を出力する。   Examples of the output device 230 include a display 231, a printer 232, and a speaker 233. The display 231 displays data such as a document, an image, and function information as well as a cursor, an icon, a tool box, and the like. The printer 232 prints image data and document data. The speaker 233 outputs sound such as sound effects and reading sounds.

図3は、スケジューラの各機能の状態遷移を示す図である。
1.初期化
図1に示すスケジューラ20は、シミュレーションを開始すると、ソフトウェアモデルSW、あるいはハードウェアモデルHWのシミュレーション・プロセスを1回ずつ実行することにより、これらモデルの初期化を行う(S1)。
FIG. 3 is a diagram illustrating state transition of each function of the scheduler.
1. Initialization When starting the simulation, the scheduler 20 shown in FIG. 1 initializes these models by executing the simulation process of the software model SW or the hardware model HW once by one (S1).

2.評価
ある検証時刻(シミュレーション時刻)に実行可能状態にあるシミュレーション・プロセスは、実行キューに入れられる。スケジューラ20は、状態“評価”でシミュレーション時刻に実行キューに入っているシミュレーション・プロセスを評価する(S2)。評価の結果、イベントが発生する場合、イベントの発生条件によってスケジューラ20は、実行キュー、あるいはタイムイベントキューに、実行すべきシミュレーション・プロセスを格納する。即時イベントの場合、イベントは実行キューに格納され、更新された実行キューに対して、スケジューラ20は再度“評価”を行う。
2. Evaluation A simulation process that is in an executable state at a certain verification time (simulation time) is placed in an execution queue. The scheduler 20 evaluates the simulation process in the execution queue at the simulation time in the state “evaluation” (S2). If an event occurs as a result of the evaluation, the scheduler 20 stores a simulation process to be executed in the execution queue or the time event queue depending on the event generation condition. In the case of an immediate event, the event is stored in the execution queue, and the scheduler 20 performs “evaluation” again on the updated execution queue.

スケジューラ20は、実行キューの内容が空になると、状態“時刻進行”に移行する(S3)。また、スケジューラ20は、監視手段22からゼロ遅延の無限ループの検出が通知され、ログ出力制御が有効でない場合、あるいはログ出力制御が有効で監視手段からログ出力終了が通知された場合においても、時刻進行に移行する。また、スケジューラ20は、監視手段22からゼロ遅延の無限ループの検出が通知されてもログ出力制御が有効な場合には、各モデルのトレースログ出力を有効にし、シミュレーションを継続する。   When the content of the execution queue becomes empty, the scheduler 20 shifts to the state “time progress” (S3). Further, the scheduler 20 is notified of the detection of an infinite loop with zero delay from the monitoring unit 22 and the log output control is not valid, or the log output control is valid and the log output is notified from the monitoring unit. Shift to time progress. If the log output control is valid even if the monitoring means 22 notifies the detection of the detection of an infinite loop with zero delay, the scheduler 20 validates the trace log output of each model and continues the simulation.

3.時刻進行
スケジューラ20は、タイムイベントキューの中から、次に実行すべきイベントのターゲット時刻(シミュレーション時刻)を取得し、ターゲット時刻(シミュレーション時刻)をその時刻まで進める。ターゲット時刻(シミュレーション時刻)を進めた後、スケジューラは状態“評価”に移行する(S4)。
3. Time progress The scheduler 20 acquires the target time (simulation time) of the next event to be executed from the time event queue, and advances the target time (simulation time) to that time. After advancing the target time (simulation time), the scheduler shifts to the state “evaluation” (S4).

図4は、シミュレーション実行時のデータ管理状態を示す図である。図示のように、次に実行するモデル(ソフトウェアモデルSWあるいはハードウェアモデルHW)A〜Hが存在する時間を、タイムイベントキュー401が管理する。また、各時間で実行するモデル(SWまたはHW)A〜Hを実行キュー402が管理する。図4に示すデータ構造は、時間を含むシミュレーションの一般的なデータ構造である。   FIG. 4 is a diagram illustrating a data management state during simulation execution. As shown in the figure, the time event queue 401 manages the time when the models (software model SW or hardware model HW) A to H to be executed next exist. Further, the execution queue 402 manages models (SW or HW) A to H executed at each time. The data structure shown in FIG. 4 is a general data structure of simulation including time.

(シミュレーション動作内容)
図5は、実施の形態1によるシミュレーション動作の内容を示すフローチャートである。図1に示したスケジューラ20とタイマ21の処理内容を示す。
(Simulation operation details)
FIG. 5 is a flowchart showing the contents of the simulation operation according to the first embodiment. The processing contents of the scheduler 20 and the timer 21 shown in FIG.

スケジューラ20は、まず、実行キュー402から現ターゲット時間に実行可能なモデル(A〜H)を取り出す。また、タイムイベントキュー401より、現ターゲット時間に実行すべきモデルがあるかをタイムイベントキュー401を参照して確認し、タイムイベントキュー401に現ターゲット時間があれば、対応する実行キュー402から該当する一つのモデルを取り出す(ステップS501)。   The scheduler 20 first takes out models (A to H) that can be executed at the current target time from the execution queue 402. Further, the time event queue 401 confirms whether there is a model to be executed at the current target time with reference to the time event queue 401. One model to be extracted is taken out (step S501).

次に、スケジューラ20は、実行可能なモデルがあるかを確認する(ステップS502)。実行可能なモデルがあれば(ステップS502:Yes)、ステップS503へ移行し、実行可能なモデルがなければ(ステップS502:No)、ステップS506へ移行する。   Next, the scheduler 20 confirms whether there is an executable model (step S502). If there is an executable model (step S502: Yes), the process proceeds to step S503. If there is no executable model (step S502: No), the process proceeds to step S506.

ステップS503では、取り出した実行可能なモデルを実行する。ここで、モデル実行中にタイマ21から割り込み要求があった場合は(ステップS504:Yes)、モデルの実行を一時停止し(ステップS505)、ステップS506に移る。モデル実行中にタイマ21からの割り込み要求がない場合は(ステップS504:No)、実行が可能でなくなるまで実行を続け、実行が終了したらステップS501へ戻る。   In step S503, the extracted executable model is executed. If an interrupt request is received from the timer 21 during model execution (step S504: Yes), model execution is temporarily stopped (step S505), and the process proceeds to step S506. If there is no interrupt request from the timer 21 during the model execution (step S504: No), the execution is continued until the execution becomes impossible. When the execution is completed, the process returns to the step S501.

ステップS506では、タイムイベントキュー401に次に実行可能なモデルがあるとき、ターゲット時間を次のタイムイベントキュー401の時刻に進める。この後、タイマ21のカウンタをリセットし(ステップS507)、ステップS501へ戻る。   In step S <b> 506, when there is a next executable model in the time event queue 401, the target time is advanced to the time in the next time event queue 401. Thereafter, the counter of the timer 21 is reset (step S507), and the process returns to step S501.

タイマ21は、カウンタのカウント値をリセットした後(ステップS511)、予め設定した時間間隔(一定時間)tを待つ(ステップS512)。この後、検証時刻のタイマ21のカウント値をカウントアップする(ステップS513)。この後、スケジューラ20からカウンタリセットの要求があれば(ステップS514:Yes)、ステップS511に戻りカウント値をリセットする。一方、スケジューラ20からカウンタリセットの要求がなければ(ステップS514:No)、カウンタの値が基準値を超えたかを判断する(ステップS515)。基準値を超えていなければ(ステップS515:No)、ステップS512に戻る。基準値を超えていれば(ステップS515:Yes)、スケジューラ20に対し割り込み要求を出し(ステップS516)、ステップS511に戻る。   After resetting the count value of the counter (step S511), the timer 21 waits for a preset time interval (fixed time) t (step S512). Thereafter, the count value of the timer 21 at the verification time is counted up (step S513). Thereafter, if there is a counter reset request from the scheduler 20 (step S514: Yes), the process returns to step S511 to reset the count value. On the other hand, if there is no counter reset request from the scheduler 20 (step S514: No), it is determined whether the counter value exceeds the reference value (step S515). If it does not exceed the reference value (step S515: No), the process returns to step S512. If it exceeds the reference value (step S515: Yes), an interrupt request is issued to the scheduler 20 (step S516), and the process returns to step S511.

上記処理によれば、従来の問題を下記のように解決することができるようになる。
1.ステップS503で取り出した実行可能なモデルの実行が終了しない場合
この場合であっても、タイマ21のカウンタがリセットされることがないため、検証時刻カウンタをカウントアップできる。そして、カウンタが基準値以上になったところで、ステップS506の処理が行え、次のモデルに実行を移すことができるようになる。
According to the above processing, the conventional problem can be solved as follows.
1. When Execution of Executable Model Taken Out in Step S503 is not Completed Even in this case, the counter of the timer 21 is not reset, so that the verification time counter can be counted up. When the counter reaches the reference value or more, the process of step S506 can be performed, and execution can be shifted to the next model.

2.どんなにシミュレーションしても、現ターゲット時間で実行可能なモデルがなくならない場合
この場合であっても、ステップS506に制御が移ることがないため、タイマ21のカウンタがリセットされることがなく、カウンタがカウントアップできる。そして、カウンタが基準値以上になったところで、ステップS506の処理が行え、次のモデルに実行を移すことができるようになる。すなわち、従来の無限ループの問題を解消できる。
2. Even if the simulation does not eliminate the model that can be executed at the current target time, even in this case, since the control does not move to step S506, the counter of the timer 21 is not reset. You can count up. When the counter reaches the reference value or more, the process of step S506 can be performed, and execution can be shifted to the next model. That is, the conventional infinite loop problem can be solved.

(実施の形態1のシミュレーション実行例)
次に、実施の形態1のシミュレーションの実行例を具体的に説明する。図6は、実施の形態1における複数のモデルの実行例を示すタイミングチャートである。ここで、モデルA、Bは、ソフトウェアモデルSWであり、モデルCは、ハードウェアモデルHWであるとする。
(Example of simulation execution in Embodiment 1)
Next, an execution example of the simulation of the first embodiment will be specifically described. FIG. 6 is a timing chart showing an execution example of a plurality of models in the first embodiment. Here, it is assumed that the models A and B are software models SW and the model C is a hardware model HW.

ターゲット時刻監視部23が監視するターゲット時刻tの経過順に説明する。
t1:ターゲット時刻(シミュレーション時刻)t1では、実行キュー402にモデル(C)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(C)のシミュレーション・プロセスを実行する。即ち、評価に移行する。
Description will be made in the order of the elapse of the target time t monitored by the target time monitoring unit 23.
t1: Since the simulation process of the model (C) is stored in the execution queue 402 at the target time (simulation time) t1, the scheduler 20 executes the simulation process of the model (C). That is, it shifts to evaluation.

モデル(C)のシミュレーション・プロセスの実行後、実行キュー402は空であるため、スケジューラ20は、状態“時刻進行”に移行し、タイムイベントキュー401に格納されている、次のタイム・イベントであるt2にターゲット時刻(シミュレーション時刻)を進める。この時、スケジューラ20は、検証時刻のタイマ(無限ループ監視用タイマ)21をクリア(キャンセル)する。   After execution of the simulation process of the model (C), since the execution queue 402 is empty, the scheduler 20 shifts to the state “time progress”, and at the next time event stored in the time event queue 401. The target time (simulation time) is advanced at a certain t2. At this time, the scheduler 20 clears (cancels) the verification time timer (infinite loop monitoring timer) 21.

t2:ターゲット時刻(シミュレーション時刻)t2では、実行キュー402にモデル(B)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(B)のシミュレーション・プロセスを実行する。即ち、評価に移行する。   t2: Since the simulation process of the model (B) is stored in the execution queue 402 at the target time (simulation time) t2, the scheduler 20 executes the simulation process of the model (B). That is, it shifts to evaluation.

モデル(B)のシミュレーション・プロセスの実行後、実行キュー402は空であるため、スケジューラ20は、時刻進行に移行し、タイムイベントキュー401に格納されている、次のタイム・イベントであるt3にターゲット時刻(シミュレーション時刻)を進める。この時、スケジューラ20は、検証時刻のタイマ21をクリアする。   After execution of the simulation process of the model (B), the execution queue 402 is empty, so the scheduler 20 shifts to time advance and at t3, which is the next time event stored in the time event queue 401. Advance the target time (simulation time). At this time, the scheduler 20 clears the timer 21 at the verification time.

t3:ターゲット時刻(シミュレーション時刻)t3では、実行キュー402にモデル(C)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(C)のシミュレーション・プロセスを実行する。即ち、評価に移行する。   t3: Since the simulation process of the model (C) is stored in the execution queue 402 at the target time (simulation time) t3, the scheduler 20 executes the simulation process of the model (C). That is, it shifts to evaluation.

モデル(C)のシミュレーション・プロセスの実行後、実行キュー402は空であるため、スケジューラ20は、時刻進行に移行し、タイムイベントキュー401に格納されている、次のタイム・イベントであるt4にターゲット時刻(シミュレーション時刻)を進める。この時、スケジューラ20は、検証時刻のタイマ21をクリアする。   After executing the simulation process of the model (C), since the execution queue 402 is empty, the scheduler 20 shifts to time advance and at t4 which is the next time event stored in the time event queue 401. Advance the target time (simulation time). At this time, the scheduler 20 clears the timer 21 at the verification time.

t4:ターゲット時刻(シミュレーション時刻)t4では、実行キュー402にモデル(A)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(A)のシミュレーション・プロセスを実行する。即ち、評価に移行する。   t4: Since the simulation process of the model (A) is stored in the execution queue 402 at the target time (simulation time) t4, the scheduler 20 executes the simulation process of the model (A). That is, it shifts to evaluation.

ここで、図示のように、モデル(A)のシミュレーション・プロセスの実行中に、モデル(B)を起動する即時イベントが発生すると、実行キュー402にモデル(B)を登録する。モデル(A)のシミュレーション・プロセスの実行後、実行キュー402にはモデル(B)があるため、スケジューラ20は、モデル(B)のシミュレーション・プロセスを実行する。これらモデル(A,B)は、いずれもアンタイムドのソフトウェアモデルである。   Here, as shown in the figure, when an immediate event for starting the model (B) occurs during the execution of the simulation process of the model (A), the model (B) is registered in the execution queue 402. After execution of the simulation process of model (A), since there is model (B) in execution queue 402, scheduler 20 executes the simulation process of model (B). These models (A, B) are all untimed software models.

また、図示のように、モデル(B)のシミュレーション・プロセスの実行中に、モデル(A)を起動する即時イベントが発生すると、実行キュー402にモデル(A)を登録する。モデル(B)のシミュレーション・プロセスの実行後、実行キュー402にはモデル(A)があるため、スケジューラ20は、モデル(A)のシミュレーション・プロセスを実行する。   Further, as shown in the figure, when an immediate event for starting the model (A) occurs during the execution of the simulation process of the model (B), the model (A) is registered in the execution queue 402. After execution of the simulation process of the model (B), the scheduler 20 executes the simulation process of the model (A) because the execution queue 402 has the model (A).

ここで、図示のように、モデル(A)、モデル(B)が交互に実行され、ターゲット時刻が進まない状態(無限ループ)となる。検証時刻は、タイマ21によりカウントアップされ、検証時刻がリセットされない。すなわち、タイムイベントキュー401にある、次に実行可能なモデルの時間にターゲット時間を遷移することができなくなり、シミュレーションが進まなくなる。   Here, as shown in the figure, the model (A) and the model (B) are alternately executed, and the target time does not advance (infinite loop). The verification time is counted up by the timer 21, and the verification time is not reset. That is, the target time cannot be changed to the time of the next executable model in the time event queue 401, and the simulation does not proceed.

この際、検証時刻のタイマ(無限ループ監視用タイマ)21は、検証用プラットフォーム10のコンピュータ装置が有するCPU時間11を用いてカウントをアップさせ、設定された時間間隔(この例では、検証時刻のタイマ21のカウント値T=15)に達すると、無限ループとして検出され(ステップS601)、スケジューラ20に対して、この無限ループの検出を割り込み要求により通知する。   At this time, the verification time timer (infinite loop monitoring timer) 21 counts up using the CPU time 11 of the computer device of the verification platform 10 and sets the time interval (in this example, the verification time of the verification time). When the timer 21 count value T = 15) is reached, an infinite loop is detected (step S601), and the scheduler 20 is notified of the detection of the infinite loop by an interrupt request.

割り込み要求を受けたスケジューラ20は、実行中のモデル(AまたはB)のシミュレーション・プロセスを停止させる(ステップS602)。また、検証時刻のタイマ(無限ループ監視用タイマ)21をクリア(キャンセル)する。   Upon receiving the interrupt request, the scheduler 20 stops the simulation process of the model (A or B) being executed (step S602). Further, the verification time timer (infinite loop monitoring timer) 21 is cleared (cancelled).

この後、スケジューラ20は、無限ループから脱出するために、時刻進行に移行し、タイムイベントキュー401に格納されている、次のタイム・イベントであるt5にターゲット時刻(シミュレーション時刻)を進める。   Thereafter, in order to escape from the infinite loop, the scheduler 20 shifts to time advance and advances the target time (simulation time) to t5 which is the next time event stored in the time event queue 401.

t5:ターゲット時刻(シミュレーション時刻)t5では、実行キュー402にモデル(C)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(C)のシミュレーション・プロセスを実行する。即ち、評価に移行する。   t5: Since the simulation process of the model (C) is stored in the execution queue 402 at the target time (simulation time) t5, the scheduler 20 executes the simulation process of the model (C). That is, it shifts to evaluation.

そして、図示のように、モデル(C)のシミュレーション・プロセスの実行中にモデル(B)を起動する即時イベントが発生すると、実行キュー402にモデル(B)を登録する。モデル(B)のシミュレーション・プロセスの実行後、実行キュー402は空であるため、スケジューラ20は、時刻進行に移行し、タイムイベントキュー401に格納されている、次のタイム・イベントであるt6にターゲット時刻(シミュレーション時刻)を進める。この時、スケジューラ20は、検証時刻のタイマ(無限ループ監視用タイマ)21をクリア(キャンセル)する。   As shown in the figure, when an immediate event for starting the model (B) occurs during the execution of the simulation process of the model (C), the model (B) is registered in the execution queue 402. After execution of the simulation process of the model (B), the execution queue 402 is empty. Therefore, the scheduler 20 shifts to time advance, and the next time event stored in the time event queue 401 is t6. Advance the target time (simulation time). At this time, the scheduler 20 clears (cancels) the verification time timer (infinite loop monitoring timer) 21.

上記実施の形態1によれば、ソフトウェアモデルのアンタイムドのシミュレーションで発生するゼロ遅延の無限ループを検出できるようになる。また、ゼロ遅延の無限ループがあったソフトウェアモデルの実行を停止させ、ターゲット時間を次のタイムイベントキューの時刻に進めるため、次のモデルの実行が行え、シミュレーションを遂行できるようになる。このシミュレーションは、ソフトウェアモデルの無限ループに限らず、ハードウェアモデルのバグに起因する場合であっても進めることができる。さらに、タイマに設定する時間間隔でのみ、タイマの更新と監視の処理を行うため、ゼロ遅延の無限ループ検出のためのシミュレーション速度の低下を極めて小さく抑えられる。   According to the first embodiment, it is possible to detect an infinite loop with zero delay that occurs in an untimed simulation of a software model. In addition, since the execution of the software model having an infinite loop with zero delay is stopped and the target time is advanced to the time of the next time event queue, the next model can be executed and the simulation can be performed. This simulation is not limited to the infinite loop of the software model, and can proceed even if it is caused by a bug in the hardware model. Furthermore, since the timer is updated and monitored only at the time interval set in the timer, a decrease in simulation speed for detecting an infinite loop with zero delay can be suppressed to a very small level.

(実施の形態2)
次に、実施の形態2によるシミュレーション装置について説明する。実施の形態2のスケジューラ20は、無限ループ検出時にログ出力を行う機能が追加されている。
(Embodiment 2)
Next, a simulation apparatus according to Embodiment 2 will be described. The scheduler 20 of the second embodiment has a function for outputting a log when an infinite loop is detected.

(シミュレーション動作内容)
図7は、実施の形態2によるシミュレーション動作の内容を示すフローチャートである。図1に示したスケジューラ20とタイマ21の処理内容を示す。タイマ21は、ログ出力機能の追加に伴い、実行監視タイマ21aと、ログ出力を監視するログ出力監視タイマ21bとからなる。うち、実行監視タイマ21aは、図1に示したタイマ21同様に、無限ループ監視用タイマとして機能する。これら実行監視タイマ21aおよびログ出力監視タイマ21bは、いずれも検証用プラットフォーム10の検証時刻(CPU時間)11を用いてカウント動作する。
(Simulation operation details)
FIG. 7 is a flowchart showing the contents of the simulation operation according to the second embodiment. The processing contents of the scheduler 20 and the timer 21 shown in FIG. The timer 21 includes an execution monitoring timer 21a and a log output monitoring timer 21b for monitoring log output in accordance with the addition of the log output function. Among them, the execution monitoring timer 21a functions as an infinite loop monitoring timer, like the timer 21 shown in FIG. Both the execution monitoring timer 21a and the log output monitoring timer 21b perform a counting operation using the verification time (CPU time) 11 of the verification platform 10.

実行監視タイマ21aが行う無限ループの監視内容は、実施の形態1(図5)と同様であり、同一のステップ番号を付してある。ログ出力監視タイマ21bは、スケジューラ20からタイマスタートの指示を受けて動作する。   The monitoring contents of the infinite loop performed by the execution monitoring timer 21a are the same as those in the first embodiment (FIG. 5), and are assigned the same step numbers. The log output monitoring timer 21b operates in response to a timer start instruction from the scheduler 20.

はじめに、予め設定した時間間隔(一定時間)を待つ(ステップS521)。この後、実行監視タイマ21aのカウント値をカウントアップする(ステップS522)。この後、スケジューラ20からカウントアップの停止要求がくれば(ステップS523:Yes)、処理を終了する一方、停止要求がこなければ(ステップS523:No)、ステップS524に移行する。   First, it waits for a preset time interval (fixed time) (step S521). Thereafter, the count value of the execution monitoring timer 21a is counted up (step S522). Thereafter, if the count-up stop request is received from the scheduler 20 (step S523: Yes), the process is terminated. On the other hand, if the stop request is not received (step S523: No), the process proceeds to step S524.

ステップS524では、実行監視タイマ21aのカウント値がログ出力にかかる時間相当のカウンタ基準値を超えたか判断し、カウント値がカウンタ基準値を超えていない場合には(ステップS524:No)、ステップS521に戻る。一方、カウント値がカウンタ基準値を超えた場合には(ステップS524:Yes)、スケジューラ20に対し、割り込み要求を出す(ステップS525)。   In step S524, it is determined whether the count value of the execution monitoring timer 21a exceeds a counter reference value corresponding to the time required for log output. If the count value does not exceed the counter reference value (step S524: No), step S521 is performed. Return to. On the other hand, when the count value exceeds the counter reference value (step S524: Yes), an interrupt request is issued to the scheduler 20 (step S525).

スケジューラ20の処理内容は、基本的に実施の形態1(図5)と同様の処理には同一のステップ番号を付してある。ステップS504までは実施の形態1(図5)と同様の処理が実行される。   The processing contents of the scheduler 20 are basically the same as those in the first embodiment (FIG. 5) with the same step numbers. Up to step S504, processing similar to that in the first embodiment (FIG. 5) is executed.

ステップS504において割り込み要求があった場合(ステップS504:Yes)、次に、割り込み種類が判別される(ステップS508)。割り込み種類がログ出力監視タイマ21bから出されたものである場合には(ステップS508:a)、ステップS506に移行し、タイムイベントキュー401に、次に実行可能なモデルがある時間にターゲット時間を遷移する。この後、実行監視タイマ21aのカウンタをリセットし、また、ログ出力監視タイマ21bを停止させ(ステップS510)、ステップS501へ戻る。   If there is an interrupt request in step S504 (step S504: Yes), then the interrupt type is determined (step S508). When the interrupt type is one issued from the log output monitoring timer 21b (step S508: a), the process proceeds to step S506, and the target time is set to the time event queue 401 at a time when there is a next executable model. Transition. Thereafter, the counter of the execution monitoring timer 21a is reset, the log output monitoring timer 21b is stopped (step S510), and the process returns to step S501.

割り込み種類が実行監視タイマ21aから出されたものである場合には(ステップS508:b)、モデルの実行を一時停止し(ステップS505)、ログ出力監視タイマ21bをスタートさせ(ステップS509)、ステップS501に戻る。   If the interrupt type is issued from the execution monitoring timer 21a (step S508: b), the execution of the model is temporarily stopped (step S505), the log output monitoring timer 21b is started (step S509), and step Return to S501.

(実施の形態2のシミュレーション実行例)
次に、実施の形態2のシミュレーションの実行例を具体的に説明する。図8は、実施の形態2における複数のモデルの実行例を示すタイミングチャートである。無限ループの検出(ステップS601)により、スケジューラ20が実行中のモデル(AまたはB)のシミュレーション・プロセスを停止させる(ステップS602)処理までは、実施の形態1(図6)と同様の処理を行う。
(Example of simulation execution in Embodiment 2)
Next, an execution example of the simulation of the second embodiment will be specifically described. FIG. 8 is a timing chart showing an execution example of a plurality of models in the second embodiment. The processing similar to that of the first embodiment (FIG. 6) is performed until the processing of stopping the simulation process of the model (A or B) being executed by the scheduler 20 (step S602) by detecting the infinite loop (step S601). Do.

この後、スケジューラ20は、各モデルのログ出力機能を有効にして、実行監視タイマ(無限ループ監視用タイマ)21aをクリア(キャンセル)する。そして再度、t4時刻の実行キュー402からシミュレーション・プロセスを実行する。   Thereafter, the scheduler 20 enables the log output function of each model and clears (cancels) the execution monitoring timer (infinite loop monitoring timer) 21a. Then, the simulation process is executed again from the execution queue 402 at time t4.

実行キュー402にモデル(A)のシミュレーション・プロセスが格納されているため、スケジューラ20は、まず、モデル(A)のシミュレーション・プロセスを実行する。即ち、評価に移行する。以下再度、モデル(A,B)の無限ループを実行し続けることになる。   Since the simulation process of the model (A) is stored in the execution queue 402, the scheduler 20 first executes the simulation process of the model (A). That is, it shifts to evaluation. Thereafter, the infinite loop of the model (A, B) is continued to be executed again.

ログ出力監視タイマ21bは、検証用プラットフォーム10のコンピュータ装置のCPU時間(検証時刻)11を用いてカウンタをカウントアップし、モデル(A,B)のログ出力を行う(ステップS603)。このログ出力は、ログ出力に必要な時間相当で設定されたタイマ間隔(この例では、ログ出力監視タイマ21bのカウント値T=4)の間行われ、タイマ間隔に達すると、ログ出力監視タイマ21bは、スケジューラ20に対して、ログ出力の停止を割り込み要求により通知する(ステップS604)。   The log output monitoring timer 21b counts up the counter using the CPU time (verification time) 11 of the computer device of the verification platform 10, and outputs the log of the model (A, B) (step S603). This log output is performed during a timer interval (in this example, the count value T = 4 of the log output monitoring timer 21b) set corresponding to the time required for log output. When the timer interval is reached, the log output monitoring timer is reached. 21b notifies the scheduler 20 of log output stop by an interrupt request (step S604).

この後、スケジューラ20は、無限ループから脱出するために、時刻進行に移行し、タイムイベントキュー401に格納されている次のタイム・イベントであるt5にターゲット時刻(シミュレーション時刻)を進める。また、スケジューラ20は、ログ出力監視タイマ21bからの割り込み要求であるため、ログ出力監視タイマ21bの停止、ターゲット時刻の更新、実行監視タイマ21aのリセットを行う。   Thereafter, in order to escape from the infinite loop, the scheduler 20 shifts to time advance and advances the target time (simulation time) to t5 which is the next time event stored in the time event queue 401. Further, since the scheduler 20 is an interrupt request from the log output monitoring timer 21b, the scheduler 20 stops the log output monitoring timer 21b, updates the target time, and resets the execution monitoring timer 21a.

t5:ターゲット時刻(シミュレーション時刻)t5では、実行キュー402にモデル(C)のシミュレーション・プロセスが格納されているため、スケジューラ20は、モデル(C)のシミュレーション・プロセスを実行する。即ち、Evaluateする。図示の例では、モデル(C)のシミュレーション・プロセスの実行中に、モデル(B)を起動する即時イベントが発生し、実行キュー402にモデル(B)を登録する。   t5: Since the simulation process of the model (C) is stored in the execution queue 402 at the target time (simulation time) t5, the scheduler 20 executes the simulation process of the model (C). That is, Evaluate. In the illustrated example, an immediate event for starting the model (B) occurs during execution of the simulation process of the model (C), and the model (B) is registered in the execution queue 402.

モデル(C)のシミュレーション・プロセスの実行後、実行キュー402にはモデル(B)があるため、スケジューラはモデル(B)のシミュレーション・プロセスを実行する。モデル(B)のシミュレーション・プロセスの実行後、実行キュー402は空となるため、スケジューラ20は、時刻進行に移行し、タイムイベントキュー401に格納されている次のタイム・イベントにターゲット時刻(シミュレーション時刻)を進める。この時、スケジューラ20は、実行監視タイマ(無限ループ監視用タイマ)21aをリセットする。   After execution of the model (C) simulation process, the scheduler executes the model (B) simulation process because the execution queue 402 has the model (B). After execution of the simulation process of the model (B), the execution queue 402 becomes empty. Therefore, the scheduler 20 shifts to time advance, and the target time (simulation) is set to the next time event stored in the time event queue 401. Time). At this time, the scheduler 20 resets the execution monitoring timer (infinite loop monitoring timer) 21a.

上記実施の形態2によれば、実施の形態1の効果に加えて、無限ループ発生時にループ解析に必要な、アンタイムドのソフトウェアモデルの状態トレース情報を得ることができるようになる。これにより、発生した無限ループの解析を容易に行えるようになる。   According to the second embodiment, in addition to the effects of the first embodiment, it is possible to obtain state trace information of an untimed software model necessary for loop analysis when an infinite loop occurs. As a result, the generated infinite loop can be easily analyzed.

なお、この実施の形態で説明したシミュレーション方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、インターネット等のネットワークを介して配布することが可能な伝送媒体であってもよい。   The simulation method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The program may be a transmission medium that can be distributed via a network such as the Internet.

以上の実施の形態に関し、更に以下の付記を開示する。   Regarding the above embodiment, the following additional notes are disclosed.

(付記1)ターゲットプロセッサ上で動作するソフトウェアモデルと、ハードウェアモデルとの協調動作を検証するシミュレーション装置において、
前記ハードウェアモデルの実行スケジューリングを行うスケジューラと、
前記ソフトウェアモデルの処理時間を検証用プラットフォームにおける検証時刻から算出するタイマと、
前記タイマの値に基づき、予め設定されたタイマ間隔でシミュレーション時刻を監視し、当該シミュレーション時刻に変化がないことにより処理遅延時間を持たないソフトウェアモデルの無限ループを検出する監視手段と、
を備え、
前記スケジューラは、前記監視手段による前記無限ループの検出により、前記ソフトウェアモデルの実行を停止させることを特徴とするシミュレーション装置。
(Supplementary note 1) In a simulation apparatus for verifying cooperative operation between a software model operating on a target processor and a hardware model,
A scheduler for performing execution scheduling of the hardware model;
A timer for calculating the processing time of the software model from the verification time in the verification platform;
Monitoring means for monitoring the simulation time at a preset timer interval based on the value of the timer, and detecting an infinite loop of the software model having no processing delay time due to no change in the simulation time;
With
The scheduler stops the execution of the software model by detecting the infinite loop by the monitoring unit.

(付記2)前記スケジューラは、前記監視手段による前記無限ループの検出により、シミュレーション時刻を処理遅延時間を持つハードウェアモデルの次のタイム・イベントまで進め、当該ハードウェアモデルのシミュレーションを実行することを特徴とする付記1に記載のシミュレーション装置。 (Supplementary note 2) The scheduler advances the simulation time to the next time event of the hardware model having the processing delay time by detecting the infinite loop by the monitoring means, and executes the simulation of the hardware model. The simulation apparatus according to appendix 1, which is characterized.

(付記3)前記スケジューラは、ログ出力制御手段を備え、
当該ログ出力制御手段は、前記監視手段による前記無限ループの検出時に、予め設定された前記検証用プラットフォームにおける検証時刻の間、前記処理遅延時間を持たないソフトウェアモデルの状態トレース情報をログ出力することを特徴とする付記1または2に記載のシミュレーション装置。
(Supplementary Note 3) The scheduler includes log output control means,
The log output control means logs the state trace information of the software model that does not have the processing delay time during a preset verification time in the verification platform when the monitoring means detects the infinite loop. The simulation apparatus according to appendix 1 or 2, characterized by:

(付記4)前記ログ出力制御手段によるログ出力後に、シミュレーション時刻を前記処理遅延時間を持つハードウェアモデルの次のタイム・イベントまで進め、当該ハードウェアモデルのシミュレーションを実行することを特徴とする付記3に記載のシミュレーション装置。 (Supplementary note 4) After the log output by the log output control means, the simulation time is advanced to the next time event of the hardware model having the processing delay time, and the simulation of the hardware model is executed. 3. The simulation apparatus according to 3.

(付記5)前記スケジューラは、前記ハードウェアモデルの評価タイミングをイベント・ドリブンでスケジューリングすることを特徴とする付記1〜4のいずれか一つに記載のシミュレーション装置。 (Additional remark 5) The said scheduler schedules the evaluation timing of the said hardware model by event driven, The simulation apparatus as described in any one of Additional remark 1-4 characterized by the above-mentioned.

(付記6)前記ソフトウェアモデルは、Cベース言語で記述されていることを特徴とする付記1〜5のいずれか一つに記載のシミュレーション装置。 (Supplementary note 6) The simulation apparatus according to any one of supplementary notes 1 to 5, wherein the software model is described in a C base language.

(付記7)前記ハードウェアモデルは、システムレベル設計言語で記述されていることを特徴とする付記1〜6のいずれか一つに記載のシミュレーション装置。 (Supplementary note 7) The simulation apparatus according to any one of supplementary notes 1 to 6, wherein the hardware model is described in a system level design language.

(付記8)ターゲットプロセッサ上で動作するソフトウェアモデルと、ハードウェアモデルとの協調動作を検証する処理をコンピュータに実行させるプログラムにおいて、
コンピュータを、
前記ハードウェアモデルの実行スケジューリングを行うスケジューラと、
前記ソフトウェアモデルの処理時間を検証用プラットフォームにおける検証時刻から算出するタイマと、
前記タイマの値に基づき、予め設定されたタイマ間隔でシミュレーション時刻を監視し、当該シミュレーション時刻に変化がないことにより処理遅延時間を持たないソフトウェアモデルの無限ループを検出する監視手段、として機能させ、
前記スケジューラは、前記監視手段による前記無限ループの検出により、前記ソフトウェアモデルの実行を停止させることを特徴とするプログラム。
(Additional remark 8) In the program which makes a computer perform the process which verifies cooperation operation | movement with the software model and hardware model which operate | move on a target processor,
Computer
A scheduler for performing execution scheduling of the hardware model;
A timer for calculating the processing time of the software model from the verification time in the verification platform;
Based on the value of the timer, monitor the simulation time at a preset timer interval, and function as monitoring means for detecting an infinite loop of the software model that does not have a processing delay time due to no change in the simulation time,
The scheduler stops the execution of the software model when the monitoring unit detects the infinite loop.

この発明のシミュレーション装置の構成を示す図である。It is a figure which shows the structure of the simulation apparatus of this invention. シミュレーション装置のハードウェア構成を示す説明図である。It is explanatory drawing which shows the hardware constitutions of a simulation apparatus. スケジューラの各機能の状態遷移を示す図である。It is a figure which shows the state transition of each function of a scheduler. シミュレーション実行時のデータ管理状態を示す図である。It is a figure which shows the data management state at the time of simulation execution. 実施の形態1によるシミュレーション動作の内容を示すフローチャートである。3 is a flowchart showing the contents of a simulation operation according to the first embodiment. 実施の形態1における複数のモデルの実行例を示すタイミングチャートである。3 is a timing chart illustrating an execution example of a plurality of models in the first embodiment. 実施の形態2によるシミュレーション動作の内容を示すフローチャートである。10 is a flowchart showing the contents of a simulation operation according to the second embodiment. 実施の形態2における複数のモデルの実行例を示すタイミングチャートである。10 is a timing chart illustrating an execution example of a plurality of models in the second embodiment.

符号の説明Explanation of symbols

1 シミュレーション装置
10 検証用プラットフォーム
20 スケジューラ
21 タイマ
22 監視手段
23 ターゲット時刻監視部
210 コンピュータ本体
211 光ディスク
240 ネットワーク
401 タイムイベントキュー
402 実行キュー
SW ソフトウェアモデル
HW ハードウェアモデル
DESCRIPTION OF SYMBOLS 1 Simulation apparatus 10 Verification platform 20 Scheduler 21 Timer 22 Monitoring means 23 Target time monitoring part 210 Computer main body 211 Optical disk 240 Network 401 Time event queue 402 Execution queue SW Software model HW Hardware model

Claims (6)

ターゲットプロセッサ上で動作するソフトウェアモデルと、ハードウェアモデルとの協調動作を検証するシミュレーション装置において、
前記ハードウェアモデルの実行スケジューリングを行うスケジューラと、
前記ソフトウェアモデルの処理時間を検証用プラットフォームにおける検証時刻から算出するタイマと、
前記タイマの値に基づき、予め設定されたタイマ間隔でシミュレーション時刻を監視し、当該シミュレーション時刻に変化がないことにより処理遅延時間を持たないソフトウェアモデルの無限ループを検出する監視手段と、
を備え、
前記スケジューラは、前記監視手段による前記無限ループの検出により、前記ソフトウェアモデルの実行を停止させることを特徴とするシミュレーション装置。
In the simulation device that verifies the cooperative operation between the software model that runs on the target processor and the hardware model,
A scheduler for performing execution scheduling of the hardware model;
A timer for calculating the processing time of the software model from the verification time in the verification platform;
Monitoring means for monitoring the simulation time at a preset timer interval based on the value of the timer, and detecting an infinite loop of the software model having no processing delay time due to no change in the simulation time;
With
The scheduler stops the execution of the software model by detecting the infinite loop by the monitoring unit.
前記スケジューラは、前記監視手段による前記無限ループの検出により、シミュレーション時刻を処理遅延時間を持つハードウェアモデルの次のタイム・イベントまで進め、当該ハードウェアモデルのシミュレーションを実行することを特徴とする請求項1に記載のシミュレーション装置。   The scheduler advances a simulation time to a next time event of a hardware model having a processing delay time by detecting the infinite loop by the monitoring unit, and executes the simulation of the hardware model. Item 2. The simulation device according to Item 1. 前記スケジューラは、ログ出力制御手段を備え、
当該ログ出力制御手段は、前記監視手段による前記無限ループの検出時に、予め設定された前記検証用プラットフォームにおける検証時刻の間、前記処理遅延時間を持たないソフトウェアモデルの状態トレース情報をログ出力することを特徴とする請求項1または2に記載のシミュレーション装置。
The scheduler includes log output control means,
The log output control means logs the state trace information of the software model that does not have the processing delay time during a preset verification time in the verification platform when the monitoring means detects the infinite loop. The simulation apparatus according to claim 1, wherein:
前記ログ出力制御手段によるログ出力後に、シミュレーション時刻を前記処理遅延時間を持つハードウェアモデルの次のタイム・イベントまで進め、当該ハードウェアモデルのシミュレーションを実行することを特徴とする請求項3に記載のシミュレーション装置。   4. The simulation of the hardware model is executed by advancing the simulation time to the next time event of the hardware model having the processing delay time after the log output by the log output control means. Simulation equipment. 前記スケジューラは、前記ハードウェアモデルの評価タイミングをイベント・ドリブンでスケジューリングすることを特徴とする請求項1〜4のいずれか一つに記載のシミュレーション装置。   The simulation apparatus according to claim 1, wherein the scheduler schedules the evaluation timing of the hardware model in an event-driven manner. ターゲットプロセッサ上で動作するソフトウェアモデルと、ハードウェアモデルとの協調動作を検証する処理をコンピュータに実行させるプログラムにおいて、
コンピュータを、
前記ハードウェアモデルの実行スケジューリングを行うスケジューラと、
前記ソフトウェアモデルの処理時間を検証用プラットフォームにおける検証時刻から算出するタイマと、
前記タイマの値に基づき、予め設定されたタイマ間隔でシミュレーション時刻を監視し、当該シミュレーション時刻に変化がないことにより処理遅延時間を持たないソフトウェアモデルの無限ループを検出する監視手段、として機能させ、
前記スケジューラは、前記監視手段による前記無限ループの検出により、前記ソフトウェアモデルの実行を停止させることを特徴とするプログラム。
In a program that causes a computer to execute a process of verifying cooperative operation between a software model that operates on a target processor and a hardware model,
Computer
A scheduler for performing execution scheduling of the hardware model;
A timer for calculating the processing time of the software model from the verification time in the verification platform;
Based on the value of the timer, monitor the simulation time at a preset timer interval, and function as monitoring means for detecting an infinite loop of the software model that does not have a processing delay time due to no change in the simulation time,
The scheduler stops the execution of the software model when the monitoring unit detects the infinite loop.
JP2008164553A 2008-06-24 2008-06-24 Simulation apparatus and program Expired - Fee Related JP5066013B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008164553A JP5066013B2 (en) 2008-06-24 2008-06-24 Simulation apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008164553A JP5066013B2 (en) 2008-06-24 2008-06-24 Simulation apparatus and program

Publications (2)

Publication Number Publication Date
JP2010009113A JP2010009113A (en) 2010-01-14
JP5066013B2 true JP5066013B2 (en) 2012-11-07

Family

ID=41589567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008164553A Expired - Fee Related JP5066013B2 (en) 2008-06-24 2008-06-24 Simulation apparatus and program

Country Status (1)

Country Link
JP (1) JP5066013B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5374965B2 (en) * 2008-08-25 2013-12-25 富士通株式会社 Simulation control program, simulation control apparatus, and simulation control method
FR2971596B1 (en) * 2011-02-15 2016-01-01 Commissariat Energie Atomique DEVICE FOR ACCELERATING THE EXECUTION OF A SYSTEMS SIMULATION

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003022296A (en) * 2001-07-06 2003-01-24 Matsushita Electric Ind Co Ltd Cooperative simulation method and device
JP2005018623A (en) * 2003-06-27 2005-01-20 Sony Corp Simulation device and simulation method
JP2006048525A (en) * 2004-08-06 2006-02-16 Toshiba Corp Simulation method
JP2008059192A (en) * 2006-08-30 2008-03-13 Oki Electric Ind Co Ltd Simulator for verifying coordination between hardware and software

Also Published As

Publication number Publication date
JP2010009113A (en) 2010-01-14

Similar Documents

Publication Publication Date Title
US11175933B2 (en) Application documentation effectiveness monitoring and feedback
CN106462488B (en) Performance optimization hint presentation during debug
CN107844331B (en) Method, device and equipment for generating boot configuration file
CN102609296A (en) Virtual machine branching and parallel execution
CN109766196A (en) A task scheduling method, device and equipment
US9690682B2 (en) Program information generating system, method, and computer program product
Pazzaglia et al. Characterizing the effect of deadline misses on time-triggered task chains
JP5066013B2 (en) Simulation apparatus and program
JP2011107455A (en) Method and device for supporting training scenario creation of operation training simulator
JP2018014107A (en) Approximate computing for application performance in heterogeneous systems
JP2006185055A (en) Design support system and design support program for computer system
JP5811859B2 (en) Source code static analysis device, system, method, and program therefor
JP6120657B2 (en) Integrated simulator apparatus, simulation method, and program
JPWO2010140240A1 (en) Process design program, process design apparatus, and process design method
US11550693B2 (en) Data logger for a real-time robotic control system
JP2016115168A (en) Program, information processing apparatus, and evaluation method
JP4997144B2 (en) Multitask processing apparatus and method
JP6528769B2 (en) INFORMATION PROCESSING APPARATUS, PROCESSING METHOD, AND PROGRAM
JPWO2012056611A1 (en) Availability model generator
US9008991B2 (en) Monitoring of interactive computing system responsiveness
Beningo RTOS Application Design
JP5349876B2 (en) Information processing apparatus, information processing method, and program
JP2009217720A (en) Program generating device and program generating method
JPH10161891A (en) Interrupt controller
JP6331400B2 (en) Verification method, verification apparatus, and verification program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110311

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120718

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120724

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120810

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150817

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees