JP2004021904A - Simultaneous simulation system and simultaneous simulation method for a plurality of processors - Google Patents

Simultaneous simulation system and simultaneous simulation method for a plurality of processors Download PDF

Info

Publication number
JP2004021904A
JP2004021904A JP2002179733A JP2002179733A JP2004021904A JP 2004021904 A JP2004021904 A JP 2004021904A JP 2002179733 A JP2002179733 A JP 2002179733A JP 2002179733 A JP2002179733 A JP 2002179733A JP 2004021904 A JP2004021904 A JP 2004021904A
Authority
JP
Japan
Prior art keywords
simulation
time
unit
clock
clocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002179733A
Other languages
Japanese (ja)
Other versions
JP3960866B2 (en
Inventor
Nobuaki Nakanishi
中西 信明
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2002179733A priority Critical patent/JP3960866B2/en
Publication of JP2004021904A publication Critical patent/JP2004021904A/en
Application granted granted Critical
Publication of JP3960866B2 publication Critical patent/JP3960866B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To simulate simultaneous execution of programs in a plurality of microcomputer systems respectively containing processors. <P>SOLUTION: A system A time management means 105 for managing progress of simulation time of a system A simulation part 111a, a system A time management means for managing progress of simulation time of a system B simulation part 111a, and a reference operation storing means 107 for storing reference operating time that will be used as a reference for a change-over of simulation object systems are provided in an intersystem synchronization information management means 104. Simulation of the system A simulation part 111a is executed for only a number of clocks acquired by dividing the reference operating time by one clock time of the system A, and simulation of the system B simulation part 111b is executed for only a number of clocks acquired by dividing the reference operating time by one clock time of the system B. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明はプロセッサでのプログラムの実行をシミュレートするソフトウェアのシミュレーション装置に関し、特にそれぞれにプロセッサを含む複数のシステムにおけるプログラムの同時実行をシミュレーションするシミュレーション装置およびシミュレーション方法に関する。
【0002】
【従来の技術】
従来のマイクロコンピュータのソフトウェアシミュレーション装置が特開2000−276502号公報に記載されている。この従来例ではシミュレーション部611は、図19に示すように、プロセッサシミュレート手段612と、同期情報管理手段614と、プログラム/データメモリ615と、外部割込生成手段616と、周辺回路シミュレート手段621とを備えて構成されている。周辺回路シミュレート手段621はその内部に、周辺回路シミュレータ起動/管理手段613と、I/Oレジスタメモリ領域617と、タイマ回路シミュレータ618と、パラレル入出力回路シミュレータ619と、シリアル入出力回路シミュレータとを備えている。
【0003】
このような構成を有する従来のソフトウェアシミュレーション装置のシミュレーション部611は次のように動作する。すなわち、プロセッサシミュレート手段612は、プログラム/データメモリ615からプログラムをロードし、ロードした命令を1ステップ毎に実行する。外部割込生成手段616は、割込が入力されたことをプロセッサシミュレート手段612に通知する。プロセッサシミュレート手段612は、外部割込生成手段616から割込が入力されたことが通知されると、割込処理を行う。周辺回路シミュレータ起動/管理手段613はマイクロコンピュータの備える周辺回路について周辺回路実行ファイル情報を管理する。また、周辺回路シミュレータ起動/管理手段613は、シミュレーション部611の起動時に、管理している周辺回路実行ファイル情報をもとに登録されている各周辺回路シミュレータを起動する。同期情報管理手段614は、プロセッサシミュレート手段612と起動された各周辺回路シミュレータ(パラレル入力回路シミュレータ619、シリアル入出力回路シミュレータ620およびタイマー回路シミュレータ618)に、プロセッサシミュレートの最小タイミング情報であるクロック情報を供給する。シミュレーション部611と各周辺回路シミュレータとは、I/Oレジスタメモリ領域617を介してデータの入出力を行う。外部との通信は、パラレル入出力回路シミュレータ619またはシリアル入出力回路シミュレータ620が予め用意された入力データファイル、出力データファイルをオープンすることによりシミュレーションされる。
【0004】
【発明が解決しようとする課題】
しかし、図19の従来例は、基本的に単一のプロセッサコアを含むマイクロコンピュータシステムの動作をシミュレーションするものであり、同一周波数でプロセッサコアが動作する複数のマイクロコンピュータシステムのシミュレーションの場合、または異なる周波数でプロセッサコアが動作するが各システムが独立して動作する場合などの特殊な場合のシミュレーションには拡張して適用できる可能性があるものの、異なる動作周波数を持つプロセッサコアをそれぞれに含む複数のシステムの同時動作をシミュレーションすることは実質的に不可能であった。
【0005】
本発明は上記のような状況を鑑みてなされたものであり、本発明の目的は、異なる動作周波数を持つプロセッサコアをそれぞれに含む複数のシステムの同時動作をシミュレーションできる複数プロセッサの同時シミュレーション装置および同時シミュレーション方法を提供することである。
【0006】
【課題を解決するための手段】
本発明の第1の発明のシミュレーション装置は、命令実行シミュレーションするプロセッサシミュレート手段をそれぞれに備える複数のシステムシミュレーション部と、前記複数のシステムシミュレーション部のそれぞれに対応して設けられシステムシミュレーション部のシミュレーションの進行を管理するシステム時間管理手段と、前記複数のシステムシミュレーション部それぞれの動作クロックの周期にあたる1クロック時間の中で最も大きい1クロック時間以下で且つ最も小さい1クロック時間以上の範囲内で設定された基準動作時間を格納する手段と、を備え、前記基準動作時間毎に前記複数のシステムシミュレーション部のシミュレーション実行の順序を所定の順序に制御するシミュレーション実行管理部と、を有して構成される。システムシミュレーション部がさらにプロセッサシミュレート手段の命令実行に応じて起動される周辺回路の動作をシミュレーションする周辺回路シミュレート手段を備え、またシミュレーション実行管理部がさらにシステムシミュレーション部の周辺回路シミュレート手段の相互間の入出力を制御するバス制御手段とを備えてもよい。
【0007】
本発明の第2の発明のシミュレーション方法は、複数のシステムでのプログラムの実行をコンピュータを用いてシミュレーションする方法であって、前記複数のシステムのそれぞれの想定クロック周波数から周期に当たる1クロック時間を算出し最も大きい1クロック時間以下で且つ最も小さい1クロック時間以上の範囲内で基準動作時間を選択して設定する第1の手順と、前記複数のシステムのそれぞれに対応して設けられた内部時計に記憶された時間に前記基準動作時間を加算する第2の手順と、前記複数のシステムのそれぞれに対して対応する内部時計に含まれるクロック数だけプログラム実行のシミュレーションを進める第3の手順と、を有することを特徴とする。前記第3の手順は、内部時計に記憶された時間がシミュレーション対象のシステムの1クロック時間以上であるかを判断する第1のサブステップと、不足クロック数が記録されていない場合には前記内部時計に含まれるクロック数だけ命令のシミュレーションを進め不足クロック数が記録されている場合には前記内部時計に含まれるクロック数から不足クロック数を差し引いたクロック数だけ命令のシミュレーションを進める第2のサブステップと、前記第2のサブステップで実行する命令に対してクロック数が不足である場合にはクロック数の不足分を不足クロック数として記憶する第3のサブステップとを備えるステップを有し、前記ステップを前記複数のシステムに対して所定の順序で行うように構成してもよい。
【0008】
【発明の実施の形態】
以下、本発明の好ましい実施の形態について添付図面を参照しながら詳細に説明する。なお、以下の説明は、本発明の実施の形態を示すものであり、本発明が以下の説明に限定されて解釈されるものではない。
【0009】
図1は、本発明のシミュレーション装置の一実施の形態のブロック図である。図1のシミュレーション装置は、それぞれがプロセッサコア、プログラム/データメモリおよび周辺回路を含む2個のマイクロコンピュータシステムの同時動作をシミュレーションするものである。
【0010】
システムAシミュレーション部111aは、プロセッサシミュレート手段112a、同期情報管理手段114a、プログラム/データメモリ115a、外部割込生成手段116aおよび周辺回路シミュレート手段121aを備えている。周辺回路シミュレート手段121aは、内部に周辺回路シミュレータ起動/管理手段113a、タイマ回路シミュレータ118a、パラレル入出力回路シミュレータ119a、シリアル入出力回路シミュレータ120aおよびI/Oレジスタメモリ領域117aを備えている。
【0011】
同様に、システムBシミュレーション部111bは、プロセッサシミュレート手段112b、同期情報管理手段114b、プログラム/データメモリ115b、外部割込生成手段116bおよび周辺回路シミュレート手段121bを備えている。周辺回路シミュレート手段121bは、内部に周辺回路シミュレータ起動/管理手段113b、タイマ回路シミュレータ118b、パラレル入出力回路シミュレータ119b、シリアル入出力回路シミュレータ120bおよびI/Oレジスタメモリ領域117bを備えている。
【0012】
シミュレーション実行管理部102は、システムAシミュレーション部111aにおけるシミュレーション実行動作およびシステムBシミュレーション部111bにおけるシミュレーション実行動作を制御する。シミュレーション実行管理部102は、シミュレータ起動手段103、システム間同期情報管理手段104およびバス制御手段108から構成される。
【0013】
システムAシミュレーション部111a内のプロセッサシミュレート手段112aは、シミュレーション実行管理部102の制御の下にプログラム/データメモリ115aからプログラムをロードし、ロードした命令を1ステップ毎に実行する。外部割込生成手段116aは、バス制御手段108または入力データファイルから割込が入力されたときにこれをプロセッサシミュレート手段112aに通知する。プロセッサシミュレート手段112aは、外部割込生成手段116aから割込が入力されたことが通知されると、割込処理を行う。周辺回路シミュレータ起動/管理手段113aはマイクロコンピュータシステムAが備える周辺回路について周辺回路実行ファイル情報を管理し、また、システムAシミュレーション部111aの起動時に、管理している周辺回路実行ファイル情報をもとに登録されている各周辺回路シミュレータを起動する。同期情報管理手段114aは、プロセッサシミュレート手段112aおよび起動された各周辺回路シミュレータ(パラレル入力回路シミュレータ119a、シリアル入出力回路シミュレータ120aおよびタイマー回路シミュレータ118a)にクロック情報を供給する。システムAシミュレーション手段111aと各周辺回路シミュレータとは、I/Oレジスタメモリ領域117aを介してデータの入出力を行う。外部との通信は、予め用意された入力データファイル、出力データファイルを、パラレル入出力回路シミュレータ119aもしくはシリアル入出力回路シミュレータ120aがオープンするか、または、パラレル入出力回路シミュレータ119aもしくはシリアル入出力回路シミュレータ120aがバス制御手段108を介してデータを送受信することによりシミュレーションされる。
【0014】
同様に、システムBシミュレーション部111b内のプロセッサシミュレート手段112bは、シミュレーション実行管理部102の制御の下にプログラム/データメモリ115bからプログラムをロードし、ロードした命令を1ステップ毎に実行する。外部割込生成手段116bは、バス制御手段108または入力データファイルから割込が入力されたときにこれをプロセッサシミュレート手段112bに通知する。プロセッサシミュレート手段112bは、外部割込生成手段116bから割込が入力されたことが通知されると、割込処理を行う。周辺回路シミュレータ起動/管理手段113bはマイクロコンピュータシステムBが備える周辺回路について周辺回路実行ファイル情報を管理し、また、システムBシミュレーション部111bの起動時に、管理している周辺回路実行ファイル情報をもとに登録されている各周辺回路シミュレータを起動する。同期情報管理手段114bは、プロセッサシミュレート手段112bおよび起動された各周辺回路シミュレータ(パラレル入力回路シミュレータ119b、シリアル入出力回路シミュレータ120bおよびタイマー回路シミュレータ118b)にクロック情報を供給する。システムBシミュレーション手段111bと各周辺回路シミュレータとは、I/Oレジスタメモリ領域117bを介してデータの入出力を行う。外部との通信は、予め用意された入力データファイル、出力データファイルを、パラレル入出力回路シミュレータ119bもしくはシリアル入出力回路シミュレータ120bがオープンするか、または、パラレル入出力回路シミュレータ119bもしくはシリアル入出力回路シミュレータ120bがバス制御手段108を介してデータを送受信することによりシミュレーションされる。
【0015】
なお、本実施例ではシステムAシミュレーション部111a内の周辺回路シミュレート部121aに含まれる周辺回路シミュレータとシステムBシミュレーション部111b内の周辺回路シミュレート部121bに含まれる周辺回路シミュレータとが同一機能のシミュレータを備えているが、説明の簡略化のためであり同一であることに限定されるものではない。
【0016】
先ず、図1を参照して、本発明のシミュレーション装置の全体の動作の概略について説明する。外部からシミュレータ起動手段103に起動指示を送ることによりシミュレーション装置を起動すると、シミュレーション実行管理部102はユーザーによって記述された起動情報ファイル101をオープンし、起動すべきシステムAシミュレーション部111aとシステムBシミュレーション部111bとを起動し、それぞれの想定動作クロック周波数を知る。また、シミュレーション実行管理部102は、バス制御手段108から外部割込生成手段116a,116bへの出力状態と、バス制御手段108とパラレル入出力回路シミュレータ119aおよびシリアル入出力回路シミュレータ120aとの入出力経路と、バス制御手段108とパラレル入出力回路シミュレータ119bおよびシリアル入出力回路シミュレータ120bとの入出力経路と、を把握する。
【0017】
次に、システム間同期情報管理手段104は、システムAシミュレーション部111aの想定動作クロック周波数およびシステムBシミュレーション部111bの想定動作クロック周波数から想定動作クロックの周期にあたる1クロック時間をそれぞれ算出し、起動情報ファイル101で指定された基準動作時間が算出した2つの1クロック時間の範囲内にあれば、指定された基準動作時間を基準動作時間格納手段107に格納する。または、小さい方の1クロック時間か大きい方の1クロック時間かの何れかを基準動作時間としてもよい。システムA時間管理手段105はシステムAシミュレーション部111aの1クロック時間をシステムAシミュレーション部111aの想定動作クロック周波数から算出して保有し、システムB時間管理手段106はシステムBシミュレーション部111bの1クロック時間をシステムBシミュレーション部111bの想定動作クロック周波数から算出し保有している。
【0018】
以下、システムAシミュレーション部111aとシステムBシミュレーション部111bのシミュレーションは基準動作時間毎に実行されるが、その際のシミュレーション実行順序として、1クロック時間が小さい方のシステムを先に行い、1クロック時間が大きい方のシステムを後に行うようにシミュレーション実行管理部102が制御するように構成しておくことが好ましい。1クロック時間が小さい方のシステムから送られるデータを1クロック時間が大きいシステムが受け取る場合に、1クロック時間が大きい方のシステムを先行してシミュレーションすると本来受け取るべき時刻にデータが送られていない状況が発生しうるからである。
【0019】
システムAシミュレーション部111aでのシミュレーションが開始されると、システムA時間管理手段105は保有しているシステムAシミュレーション部111aの1クロック時間とシステムA時間管理手段105内の内部時計に記憶された実行可能時間とを比較し、内部時計の実行可能時間が1クロック時間以上である場合に、システムAシミュレーション部111a内の同期情報管理手段114aに対し1クロック進めることを伝える。
【0020】
1クロック時間分の時間の進行を伝えられた同期情報管理手段114aは、プロセッサシミュレート手段112aに対して1クロック時間分の時間を進行させ、プロセッサシミュレート手段112aはプログラム/データメモリ115aからプログラムをロードし、命令をシミュレートする。続いて、プロセッサシミュレート手段112aは命令の実行に必要なクロック数を同期情報管理手段114aに伝達する。同期情報管理手段114aは命令の実行に必要なクロック数の間、システムA時間管理手段105から時間の進行を伝えられても何もしない。
【0021】
プロセッサシミュレート手段112aでプログラムの実行をシミュレートした結果として周辺回路シミュレータの動作が伴う場合には、プロセッサシミュレート手段112aは、周辺回路シミュレート手段121a内の周辺回路シミュレータ起動/管理手段113aへ該当する周辺回路シミュレータの起動を通知し、I/Oレジスタメモリ領域117aとタイマ回路シミュレータ118a、パラレル入出力回路シミュレータ119a、シリアル入出力回路シミュレータ120aの何れかに命令のシミュレーションを要求する。各周辺回路シミュレータからの出力のうち、バス制御手段108によって受け入れられるものはバス制御手段108が保持し、それ以外の出力は出力データファイルに保持される。また、周辺回路シミュレータへ外部から入力するもののうち、バス制御手段108から入力できるものはバス制御手段108に入力データを保持し、それ以外のものは入力データファイルから取得する。外部割込生成手段116aはバス制御手段108および入力データファイル152より割込を受けていることを判断し、プロセッサシミュレート手段112aへ通知する。
【0022】
次に、システムAシミュレーション部111aでのシミュレーション実行から同じ時間帯におけるシステムBシミュレーション部111bでのシミュレーション実行への切り替わりについて説明する。システムAシミュレーション部111aの同期情報管理手段114aからシステム間同期情報管理手段104にプロセッサシミュレート手段112aにおける命令実行処理が終わったことが通知されると、システムB時間管理手段106は保有しているシステムBシミュレーション部111bの1クロック時間とシステム間同期情報管理手段104内の内部時計に記憶された実行可能時間とを比較し、内部時計の実行可能時間が1クロック時間以上である場合に、システムBシミュレーション部111b内の同期情報管理手段114bに対し1クロック進めることを伝え、1クロック時間分の時間の進行を伝えられた同期情報管理手段114bは、プロセッサシミュレート手段112bに対して1クロック時間分の時間を進行させ、プロセッサシミュレート手段112bはプログラム/データメモリ115bからプログラムをロードし、命令をシミュレートする。以降は、システムAシミュレーション部111aについて説明したと同様にな動作がシステムBシミュレーション部111bにおいて実行される。
【0023】
図2は、本実施の形態の動作を説明するために図1に便宜的な変形を加えたブロック図である。全体については簡略化(一部は省略)し、システム間同期情報管理手段104の内部構造については図1よりも詳細に示している。システム間同期管理手段104は、システムA時間管理手段105と、システムB時間管理手段106と、基準動作時間格納手段107とを備えている。システムA時間管理手段105は、マイクロコンピュータシステムAのプロセッサの1クロック時間を記憶する1クロック時間記憶201と、実行可能時間を記憶する内部時計202とを有している。同様に、システムB時間管理手段106は、マイクロコンピュータシステムBのプロセッサの1クロック時間を記憶する1クロック時間記憶203と、実行可能時間を記憶する内部時計204とを有している。基準動作時間格納手段107には起動情報ファイル101に指定された基準動作時間が所定の条件を満たす場合に該基準動作時間が格納される。または、1クロック時間記憶201に記憶された1クロック時間と1クロック時間記憶203に記憶された1クロック時間とのうちの何れか一方を選択して基準動作時間としてもよい。
【0024】
図3は、本実施の形態のシミュレーション装置の動作を示すフロー図である。また、図4〜図9はマイクロコンピュータシステムAのプロセッサが40MHzのクロックで動作しマイクロコンピュータシステムBのプロセッサが20MHzのクロックで動作する第1の実施例における図2の各ブロックの状態を示す図である。図2を参照しながら図3のフローにしたがって全体の動作の流れを説明する。その後に、第1の実施例の図4〜図9の各ブロックの状態を参照して本発明のシミュレーション装置の動作を詳細に説明する。なお、図3は、システムAの想定動作周波数がシステムBの動作周波数よりも大きいものとしたときのフローである。
【0025】
先ず、図3のステップS1において、シミュレーション装置は、シミュレーション対象のシステム毎に動作周波数から1クロック時間を算出してシステムA時間管理手段105の1クロック時間記憶201およびシステムB時間管理手段106の1クロック時間記憶203に記憶し、また、基準動作時間を基準動作時間格納手段107にセットし、各システムに対応する不足クロック数を0に初期化する。次に、ステップS2に進み、システムA時間管理手段105の内部時計202およびシステムB時間管理手段106の内部時計204に基準動作時間をそれぞれ加算する。次に、ステップS3に進み、システムAのシミュレーションが実行される。ステップS3はサブステップS31〜S38を含んでいる。
【0026】
サブステップS31では、内部時計202の記憶する時間がシステムAの1クロック時間以上か否かを判断する。1クロック時間以上であると判断された場合にはサブステップS32に進む。
【0027】
サブステップS32では、内部時計202に記憶された時間を1クロック時間記憶201に記憶された1クロック時間で除算し、商と剰余を算出する。次にサブステップS33に進み、システムAシミュレーション部111a内の同期情報管理手段114aに不足クロック数が保持されている場合には得られた商が不足クロック数よりも大きいか否かを判断する。不足クロック数よりも大きいと判断された場合にはサブステップS35に進む。
【0028】
サブステップS35では、サブステップS32で算出された剰余を内部時計202に記憶するとともに、システムAシミュレーション部111a内の同期情報管理手段114aに対し命令の実行を指示する。また、同期情報管理手段114aに不足クロック数または余分クロック数が保持されている場合には、((命令実行に必要なクロック数+不足クロック数)−(商+余分クロック数))を算出する。次にサブステップS36に進み、算出された値が負であるか否かを判断する。負であると判断された場合にはサブステップS38に進み商を0にクリアしサブステップS35で算出された値を同期情報管理手段114aに余分クロック数として保持してサブステップS35に戻る。
【0029】
サブステップS31で内部時計202に記憶された時間が基準動作時間未満であると判断された場合にはサブステップS37へ進む。また、サブステップS33で商が不足クロック数以下であると判断された場合にはサブステップS34に進んで同期情報管理手段114aに保持されていた不足クロック数から商を減算した値を新たな不足クロック数として更新してからサブステップS37へ進む。また、サブステップS36で負ではないと判断された場合にはサブステップS37へ進む。サブステップS37では同期情報管理手段114aに不足クロック数を保持してステップS3を終える。
【0030】
次に、ステップS4に進み、システムBのシミュレーションが実行される。ステップS4はサブステップS41〜S48を含んでいる。
【0031】
サブステップS41では、内部時計204の記憶する時間がシステムBの1クロック時間以上か否かを判断する。1クロック時間以上であると判断された場合にはサブステップS42に進む。
【0032】
サブステップS42では、内部時計204に記憶された時間を1クロック時間記憶203に記憶された1クロック時間で除算し、商と剰余を算出する。次にサブステップS43に進み、システムBシミュレーション部111b内の同期情報管理手段114bに不足クロック数が保持されている場合には得られた商が不足クロック数よりも大きいか否かを判断する。不足クロック数よりも大きいと判断された場合にはサブステップS45に進む。
【0033】
サブステップS45では、サブステップS42で算出された剰余を内部時計202に記憶するとともに、システムBシミュレーション部111b内の同期情報管理手段114bに対し命令の実行を指示する。また、同期情報管理手段114bに不足クロック数または余分クロック数が保持されている場合には、((命令実行に必要なクロック数+不足クロック数)−(商+余分クロック数))を算出する。次にサブステップS46に進み、算出された値が負であるか否かを判断する。負であると判断された場合にはサブステップS48に進み商を0にクリアしサブステップS45で算出された値を同期情報管理手段114bに余分クロック数として保持してサブステップS45に戻る。
【0034】
サブステップS41で内部時計204に記憶された時間が基準動作時間未満であると判断された場合にはサブステップS47へ進む。また、サブステップS43で商が不足クロック数以下であると判断された場合にはサブステップS44に進んで同期情報管理手段114bに保持されていた不足クロック数から商を減算した値を新たな不足クロック数として更新してからサブステップS47へ進む。また、サブステップS46で負ではないと判断された場合にはサブステップS47へ進む。サブステップS47では同期情報管理手段114bに不足クロック数を保持してステップS4を終える。
【0035】
次のステップS5では、シミュレーション対象のプログラムについてすべての命令のシミュレーションが完了したか否かを判断する。完了していないと判断された場合にはステップS2に戻ってシミュレーションを続行し、完了したと判断された場合にはシミュレーションを終了する。
【0036】
なお、何らかの理由により、どちらかのシステムが停止状態になった場合には、動作しているシステムのみのシミュレーションを継続する。
【0037】
図4〜図9の第1の実施例は、想定動作クロック周波数40MHzで動作するシステムAシミュレーション部111aと想定動作クロック周波数20MHzで動作するシステムBシミュレーション部111bをシミュレーション実行管理部102によって同期して動作させ、同時動作の精度を重視して実行した場合の実施例である。
【0038】
図4を参照して具体的に説明すると、ステップS1では、シミュレーション実行管理部102は起動情報ファイル101を読み込み、システムAシミュレーション部111aとシステムBシミュレーション部111aを起動する。システム間同期情報管理手段104は、システムAシミュレーション部111aの想定動作クロック周波数40MHzから1クロック時間(25ns)を計算しシステムA時間管理手段105の1クロック時間記憶201に記憶する。同様にシステム間同期情報管理手段104は、システムBシミュレーション部111bの想定動作クロック周波数20MHzから1クロック時間(50ns)を計算しシステムB時間管理手段106の1クロック時間記憶203に記憶する。また、シミュレーション実行管理部102は、同時動作の精度を重視してシミュレーションを実行するために、システムA時間管理手段105の1クロック時間記憶201とシステムB時間管理手段106の1クロック時間記憶203とに記憶されている1クロック時間のうち小さい方の時間すなわち25nsを選択し、基準動作時間として基準動作時間格納手段107に格納する。
【0039】
ステップS2では、シミュレーション実行管理部102は、基準動作時間格納手段107に格納された基準動作時間分だけシミュレーションを進めることをシステムA時間管理手段105およびシステムB時間管理手段106へ伝達し、図4に示すように、システムA時間管理手段105では内部時計202が記憶する値に基準動作時間を加算して記憶し、システムB時間管理手段106では内部時計204が記憶する時間に基準動作時間を加算して記憶する。内部時計202,204には何れも0が記憶されていたとして、ここでは基準動作時間はシステムAの1クロック時間と等しい25nsであるのでそれぞれに25nsが記憶される。
【0040】
ステップS3ではシステムAのシミュレーションを行う。サブステップS31でシステムA時間管理手段105の内部時計202に記憶された時間(25ns)と1クロック時間記憶201に記憶された1クロック時間(25ns)とは等しいのでサブステップS32へ進み、商が1で剰余が0となる。サブステップS33では不足クロック数は0であるので、サブステップS35に進み、図5に示すように剰余の0を内部時計202に記憶し、システムAシミュレーション部111a内の同期情報管理手段114aに対し命令の実行を指示する。
【0041】
また、サブステップS35では、システムAシミュレーション部111a内の同期情報管理手段114aはプロセッサシミュレート手段112aに対し、図5に示すように、命令実行要求を出す。プロセッサシミュレート手段112aはプログラム/データメモリ115aから1命令を読み込んで実行し、その命令実行に必要なクロック数を同期情報管理手段114aへ知らせる。ここでは例えばビット・セットの命令であるSET1命令を実行し、SET1命令の実行には3クロックかかるものとする。同期情報管理手段114aは、図5に示すように、周辺回路シミュレート手段121aに3クロック分のSET1命令の実行を促し、命令実行クロック数である3から商である1を減算して不足クロックの2を得る。ここで余分クロックがないので、周辺回路シミュレート手段121aが1クロックに不足クロック数の2を加えた3クロック分の動作をシミュレーションする。続いてサブステップ36で、同期情報管理手段114aが保有する値は負ではないのでサブステップS37に進み、図5に示すように、不足クロック数として2を保持し、基準動作時間分のシミュレーション処理であるステップS3の終了をシミュレーション実行管理部102に伝える。
【0042】
続いてステップS4に移り、システムBのシミュレーションを行う。サブステップS41でシステムB用時間管理部手段106が内部時計204に記憶された動作可能時間と1クロック時間記憶203の1クロック時間とを比較する。図6に示すように、動作可能時間(25ns)が1クロック時間(50ns)よりも小さいのでサブステップS47に進んで不足クロック数を0のままとし、基準動作時間分のシミュレーション処理であるステップ4の終了をシミュレーション実行管理部102に伝える。
【0043】
ステップS5では、システムAシミュレーション部111aの同期情報管理手段114aに不足クロック数が保持されているので、命令の実行が完了していないと判断されてステップS2に戻り、シミュレーションを続行する。
【0044】
ステップS2では、シミュレーション実行管理部102は、基準動作時間格納手段107に格納された基準動作時間分だけシミュレーションを進めることをシステムA時間管理手段105およびシステムB時間管理手段106へ伝達し、図7に示すように、システムA時間管理手段105では内部時計202が記憶する値に基準動作時間を加算して記憶し、システムB時間管理手段106では内部時計204が記憶する時間に基準動作時間を加算して記憶する。
【0045】
ステップS3に移りシステムAのシミュレーションを行う。サブステップS31でシステムA時間管理手段105の内部時計202に記憶された時間(25ns)と1クロック時間記憶201に記憶された1クロック時間(25ns)とは等しいのでサブステップS32へ進み、商が1で剰余が0となる。サブステップS33では不足クロック数は0であるので、サブステップS35に進み、剰余の0を、図8に示すように、内部時計202に記憶し、システムAシミュレーション部111a内の同期情報管理手段114aに対し実行を指示するが、図8のようにシステムAシミュレーション部111a内の同期情報管理手段114a不足クロック数が保有されている場合にはプロセッサシミュレート手段112aや周辺回路シミュレート手段113aにはなにも通知しない。したがってプロセッサシミュレート手段112aや周辺回路シミュレート手段113aでの新たな命令の実行はないため、命令クロック数は0、不足クロック数は2、商は1、余分クロック数は0としてサブステップS35で算出される値は1となる。サブステップS36で負ではないのでサブステップS37に進み、システムAシミュレーション部111a内の同期情報管理手段114aは不足クロック数として1を新たに保有する。すなわち図8の場合には同期情報管理手段114aの保有する不足クロック数情報は2から1に更新され、基準動作時間分のシミュレーション処理であるステップ3の終了をシミュレーション実行管理部102に伝える。
【0046】
続いてステップS4に移り、システムBのシミュレーションを行う。サブステップS41で、図8に示すように、システムB時間管理手段106の内部時計204に記憶された時間(50ns)と1クロック時間記憶203に記憶された1クロック時間(50ns)とは等しいのでサブステップS42へ進み、商が1で剰余が0となる。サブステップS43では不足クロック数は0であるので、サブステップS45に進み、図9に示すように剰余の0を内部時計202に記憶し、システムBシミュレーション部111b内の同期情報管理手段114bに対し命令の実行を指示する。
【0047】
システムBシミュレーション部111b内の同期情報管理手段224はプロセッサシミュレート手段112bに対して命令実行要求を出し、プロセッサシミュレート手段112bは1命令をプログラム/データメモリ115bから取り込んで実行する。プロセッサシミュレート手段112bは、命令実行に必要なクロック数を同期情報管理手段224へ伝える。ここでは例えばノー・オペレーションの命令であるNOP命令を実行し、NOP命令の実行には1クロックかかるものとする。同期情報管理手段114bは、図9に示すように、周辺回路シミュレート手段121bに1クロック分のNOP命令の実行を促し、命令実行クロック数である1から商である1を減算した値0を不足クロック数として保有する。ここで余分クロックがないので、周辺回路シミュレート手段121bが1クロックに不足クロック数の0を加えた1クロック分の動作をシミュレーションする。続いてサブステップ46で、同期情報管理手段114bが保有する値は負ではないのでサブステップS47に進み、図9に示すように、不足クロック数として0を保持し、基準動作時間分のシミュレーション処理であるステップS4の終了をシミュレーション実行管理部102に伝える。
【0048】
続いてステップS5に進み、システムAシミュレーション部111aの同期情報管理手段114aに不足クロック数が保持されているので、命令の実行が完了していないと判断されてステップS2に戻り、シミュレーションを続行する。このように動作を繰り返すことにより、本発明のシミュレーション装置は、異なる動作周波数を持つプロセッサコアをそれぞれに含むマイクロコンピュータシステムAおよびマイクロコンピュータシステムBの同時動作をシミュレーションすることができる。
【0049】
次に、図10〜図15を参照してシミュレーション速度を優先してシミュレーションを実行する第2の実施例について動作を説明する。第2の実施例では、想定動作クロック周波数10MHzで動作するシステムAシミュレーション部111aと想定動作クロック周波数1MHzで動作するシステムBシミュレーション部111bとを、シミュレーション実行管理部102が制御して同時にシミュレーションする。
【0050】
先ず、ステップS1では、シミュレーション実行管理部102は起動情報ファイル101を読み込み、システムAシミュレーション部111aとシステムBシミュレーション部111aを起動する。システム間同期情報管理手段104は、システムAシミュレーション部111aの想定動作クロック周波数10MHzから1クロック時間(100ns)を計算しシステムA時間管理手段105の1クロック時間記憶201に記憶する。同様にシステム間同期情報管理手段104は、システムBシミュレーション部111bの想定動作クロック周波数1MHzから1クロック時間(1000ns)を計算しシステムB時間管理手段106の1クロック時間記憶203に記憶する。また、シミュレーション実行管理部102は、シミュレーション速度を優先してシミュレーションを実行するために、システムA時間管理手段105の1クロック時間記憶201とシステムB時間管理手段106の1クロック時間記憶203とに記憶されている1クロック時間のうち大きい方の時間すなわち1000nsを選択し、図10に示すように、基準動作時間として基準動作時間格納手段107に格納する。
【0051】
ステップS2では、シミュレーション実行管理部102は、基準動作時間格納手段107に格納された基準動作時間分だけシミュレーションを進めることをシステムA時間管理手段105およびシステムB時間管理手段106へ伝達し、図10に示すように、システムA時間管理手段105では内部時計202が記憶する値に基準動作時間を加算して記憶し、システムB時間管理手段106では内部時計204が記憶する時間に基準動作時間を加算して記憶する。内部時計202,204には何れも0が記憶されていたとして、ここでは基準動作時間はシステムBの1クロック時間と等しい1000nsであるのでそれぞれに1000nsが記憶される。
【0052】
ステップS3ではシステムAのシミュレーションを行う。サブステップS31でシステムA時間管理手段105の内部時計202に記憶された時間(1000ns)と1クロック時間記憶201に記憶された1クロック時間(100ns)とを比較し前者が大きいのでサブステップS32へ進み、商が10で剰余が0となる。サブステップS33では不足クロック数は0であるので、サブステップS35に進み、図11に示すように剰余の0を内部時計202に記憶し、システムAシミュレーション部111a内の同期情報管理手段114aに対し命令の実行を指示する。
【0053】
また、サブステップS35では、システムAシミュレーション部111a内の同期情報管理手段114aはプロセッサシミュレート手段112aに対し、図11に示すように、命令実行要求を出す。プロセッサシミュレート手段112aは1命令をプログラム/データメモリ115aから取り込んで実行し、その命令実行に必要なクロック数を同期情報管理手段114aへ知らせる。ここでは例えばビット・セットの命令であるSET1命令を実行し、SET1命令の実行には3クロックかかるものとする。同期情報管理手段114aは、図11に示すように、周辺回路シミュレート手段121aに3クロック分のSET1命令の実行を促し、命令実行クロック数である3から商である10を減算した値(−7)を保有する。サブステップ36で、同期情報管理手段114aが保有する値は負であるのでサブステップS38に進み、商を0にクリアしたのち、図11に示すように、余分クロック数として(−7)を保持する。負の符号は余分クロックであることを表す。
【0054】
同期情報管理手段114aに余分クロック数が保持されているためサブステップS35に戻り、引き続いて同期情報管理手段114aはプロセッサシミュレート手段112aに対し命令実行要求を出す。プロセッサシミュレート手段112aは次の1命令を実行し、その命令実行に必要なクロック数を同期情報管理手段114aへ知らせる。次の命令としてレジスタ間接無条件分岐の命令であるJMP命令を実行し、JMP命令の実行には3クロックかかるものとする。同期情報管理手段114aは、図12に示すように、JMP命令の命令実行クロック数である3から余分クロック数である7を減算して(−4)を得る。続いてサブステップ36からサブステップ38に進み、同期情報管理手段114aは、余分クロック数として(−4)を保持する。
【0055】
同期情報管理手段114aに余分クロック数が保持されているためサブステップS35に戻り、引き続いて同期情報管理手段114aはプロセッサシミュレート手段112aに対し命令実行要求を出す。プロセッサシミュレート手段112aは次の1命令を実行し、その命令実行に必要なクロック数を同期情報管理手段114aへ知らせる。次の命令としてSET1命令を実行し、SET1命令の実行には3クロックかかるので、同期情報管理手段114aは、図13に示すように、SET1命令の命令実行クロック数である3から余分クロック数である4を減算して(−1)を得る。続いてサブステップ36からサブステップ38に進み、同期情報管理手段114aは、余分クロック数として(−1)を保持する。
【0056】
同期情報管理手段114aに余分クロック数が保持されているためサブステップS35に戻り、引き続いて同期情報管理手段114aはプロセッサシミュレート手段112aに対し命令実行要求を出す。プロセッサシミュレート手段112aは次の1命令を実行し、その命令実行に必要なクロック数を同期情報管理手段114aへ知らせる。次の命令として割込ルーチン等からのリターンの命令であるRET1命令を実行し、RET1命令の実行には3クロックかかるものとする。同期情報管理手段114aは、図14に示すように、RET1命令の命令実行クロック数である3から余分クロック数である1を減算して不足クロック数の2を得る。ここで余分クロックがなくなったので周辺回路シミュレート手段がサブステップ35の商に相当する10クロックに不足クロック数2を加えた12クロック分の動作をシミュレーションする。この後、サブステップS46で値が正であるのでサブステップS47に進み、図14に示すように、システムAシミュレーション部111a内の同期情報管理手段114aは不足クロック数として2を保有し、基準動作時間分のシミュレーション処理であるステップ3の終了をシミュレーション実行管理部102に伝える。
【0057】
続いてステップS4に移り、システムBのシミュレーションを行う。サブステップS41で、図15に示すように、システムB時間管理手段106の内部時計204に記憶された時間(1000ns)と1クロック時間記憶203に記憶された1クロック時間(1000ns)とは等しいのでサブステップS42へ進み、商が1で剰余が0となる。サブステップS43では不足クロック数は0であるので、サブステップS45に進み、図15に示すように剰余の0を内部時計202に記憶し、システムBシミュレーション部111b内の同期情報管理手段114bに対し命令の実行を指示する。
【0058】
システムBシミュレーション部111b内の同期情報管理手段224はプロセッサシミュレート手段112bに対して命令実行要求を出し、プロセッサシミュレート手段112bは1命令をプログラム/データメモリ115bから取り込んで実行する。プロセッサシミュレート手段112bは、命令実行に必要なクロック数を同期情報管理手段114bへ伝える。ここでは例えば次の命令としてNOP命令であり、NOP命令の実行には1クロックかかるものとする。同期情報管理手段114bは、図15に示すように、周辺回路シミュレート手段121bに1クロック分のNOP命令の実行を促し、命令実行クロック数である1から商である1を減算した値0を不足クロック数として保有する。ここで余分クロックがないので、周辺回路シミュレート手段121bが1クロックに不足クロック数の0を加えた1クロック分の動作をシミュレーションする。サブステップ46で、同期情報管理手段114bが保有する値は負ではないのでサブステップS47に進み、図9に示すように、不足クロック数として0を保持し、基準動作時間分のシミュレーション処理であるステップS4の終了をシミュレーション実行管理部102に伝える。
【0059】
続いてステップS5に進み、システムAシミュレーション部111aの同期情報管理手段114aに不足クロック数が保持されているので、命令の実行が完了していないと判断されてステップS2に戻り、シミュレーションを続行する。このように動作を繰り返すことにより、第2の実施例においても第1の実施例と同様に、異なる動作周波数を持つプロセッサコアをそれぞれに含むマイクロコンピュータシステムAおよびマイクロコンピュータシステムBの同時動作をシミュレーションすることができる。これに加えて、クロック周波数が本実施例と同じ組み合わせのシステムに対して小さい方の1クロック時間を基準動作時間として用いた第1の実施例を適用した場合には図3のステップS2〜ステップS4を計4回繰り返す必要があるが、本実施例では大きい方の1クロック時間を基準動作時間として実行したため、図3のステップS2〜S4の処理を1回行うだけで同等のシミュレーションを実行できるので、シミュレーション時間を短縮することが可能となる。
【0060】
次に、第3の実施例について説明する。図16は、本発明のシミュレーション装置の第3の実施例のブロック図である。図16のシミュレーション装置は、それぞれがプロセッサコア、プログラム/データメモリおよび周辺回路シミュレータを含む4個のマイクロコンピュータシステムを同時にシミュレーションするものである。
【0061】
図16において、システムAシミュレーション部111aはプロセッサシミュレート手段112a、同期情報管理手段114a、プログラム/データメモリ115a、外部割込生成手段116a、周辺回路シミュレート手段121aを備えている。同様にシステムBシミュレーション部111bはプロセッサシミュレート手段112b、同期情報管理手段114b、プログラム/データメモリ115b、外部割込生成手段116b、周辺回路シミュレート手段121bを備え、システムCシミュレーション部111cはプロセッサシミュレート手段112c、同期情報管理手段114c、プログラム/データメモリ115c、外部割込生成手段116c、周辺回路シミュレート手段121cを備え、システムDシミュレーション部111dはプロセッサシミュレート手段112d、同期情報管理手段114d、プログラム/データメモリ115d、外部割込生成手段116d、周辺回路シミュレート手段121dを備えている。
【0062】
シミュレーション実行管理部302は、システムAシミュレーション部111aにおけるシミュレーション実行動作、システムBシミュレーション部111bにおけるシミュレーション実行動作、システムCシミュレーション部111cにおけるシミュレーション実行動作、システムDシミュレーション部111dにおけるシミュレーション実行動作を制御する。シミュレーション実行管理部302は、シミュレータ起動手段103、システム間同期情報管理手段304およびバス制御手段108から構成される。システム間同期情報管理手段304は、システムAシミュレーション部111aに対応するシステムA時間管理手段105と、システムBシミュレーション部111bに対応するシステムB時間管理手段106と、システムCシミュレーション部111cに対応するシステムC時間管理手段305と、システムDシミュレーション部111dに対応するシステムD時間管理手段306とを有している。
【0063】
本実施例では、同時動作シミュレーションの対象となるシステムが4個となっているが、一般的にはn(nは2以上の整数)個に拡張可能である。動作については、図3のステップS3およびステップS4を、それぞれがステップS3(またはステップS4)と同様のサブステップを有するn個のシステムシミュレーションステップに置き換えればよいので、詳細な説明は省略する。なお、好ましくは、n個のシステムに拡張した場合には、シミュレーション実行管理部302の制御の下に基準時動作間毎に想定動作周波数が最も大きいシステム(すなわち1クロック時間の最も小さいシステム)から想定動作周波数が最も小さいシステム(すなわち1クロック時間の最も大きいシステム)への順序でシミュレーションするように構成する。
【0064】
図16の第3の実施例においても、第1の実施例と同様にシステムA〜Dのうちの最も小さい1クロック時間を基準動作時間として採用することにより同時動作の精度を重視したシミュレーションを実行してもよく、または、第2の実施例と同様にシステムA〜Dのうちの最も大きい1クロック時間を基準動作時間として採用することによりシミュレーション速度の向上を優先したシミュレーションを実行してもよい。
【0065】
次に、本発明の第4の実施例について説明する。図17は第4の実施例のブロック図である。図17では、システムAシミュレーション部411aの周辺回路シミュレート部421a内にDMA(ダイレクトメモリアクセス)回路シミュレータ432aを設け、システムBシミュレーション部411bの周辺回路シミュレート部421b内にDMA(ダイレクトメモリアクセス)回路シミュレータ432bを設け、また、バス制御手段408内に仮想共有メモリ431を設けることにより、システムAシミュレーション部411aとシステムBシミュレーション部411bの高速通信をシミュレーションすることが可能となっている。
【0066】
起動情報ファイル101に仮想共有メモリを使うことを記述して、シミュレーション実行管理部402を起動した場合に、バス制御手段408内に仮想共有メモリ431を用意する。システム間同期情報管理手段104のシステムA時間管理手段105からシステムAシミュレーション部411aの同期情報管理手段114aにクロック数の通知をした際に、プログラム/データメモリ115aからプロセッサシミュレート手段112aに取り込まれたプログラムがダイレクトメモリアクセスの動作をするプログラムであった場合には、DMA回路シミュレータ432aは仮想メモリ共有手段431に対して転送を行うメモリの内容を通知する。仮想共有メモリ手段431はその内容を保持し、システムBシミュレーション部411bの同期情報管理手段114bにシステム間同期情報管理手段104からクロック数(図3のサブステップ45の商)が通知され、プロセッサシミュレート手段112bがプログラム/データメモリ115bからダイレクトメモリアクセスの動作をするプログラムを読んだ場合には、DMA回路シミュレータ432bを通じて仮想共有メモリ手段431に保持されているメモリの内容をプログラム/データメモリ115bに転送する。
【0067】
次に、本発明の第5の実施例について説明する。図18は第5の実施例のブロック図である。図18では、システムAシミュレーション部511aに搭載されているタイマ回路シミュレータ118aが定期的に発生するタイマ出力をシステムBシミュレーション部511bに搭載されているシリアル入出力回路シミュレータ120bの想定動作クロックとして使用する場合のシミュレーションが可能である。
【0068】
シミュレーション実行管理部102は起動情報ファイル101に記述されたシステムAシミュレーション部511aからの端子出力の接続先がシステムBシミュレーション部511bのクロックジェネレータである場合に、バス制御手段108の接続先をシステムBシミュレーション部511bの同期情報管理手段114bに設定する。システムAシミュレーション部511aの周辺回路シミュレート手段521a内のタイマ回路シミュレータ手段118aにタイマ出力が発生した場合に、タイマ回路シミュレータ手段118はシミュレーション実行管理部102のバス制御手段108へタイマ出力情報を伝達し、バス制御手段108はタイマ出力情報を保持する。システムBシミュレーション部511bのシミュレーション時に周辺回路シミュレート手段521b内のシリアル入出力回路シミュレータ120bから動作クロックの要求があった場合に、同期情報管理手段114bはバス制御手段108に対して保持している情報の公開を求める。同期情報管理手段114bは受け取ったタイマ出力情報をシリアル入出力回路シミュレータ手段120bに伝達し、シリアル入出力回路シミュレータ手段120bはタイマ出力情報を動作クロックとしてシミュレーションする。
【0069】
なお、本発明のシミュレーション装置は、シミュレーション実行管理部および複数のシステムシミュレーション部を備える1個の専用のハードウェアとして実現してもよいが、汎用のコンピュータとシミュレーション実行管理部の機能を有するプログラムおよび複数のシステムシミュレーション部のそれぞれの機能を有するプログラムを用いて構成してもよい。さらに、例えば、システムAシミュレーション部の機能のプログラムとシミュレーション実行管理部の機能のプログラムとをひとつのコンピュータ上に搭載し、システムBシミュレーション部の機能のプログラムを別のコンピュータに搭載するなど、複数のコンピュータに分散してネットワークを介して接続してもよく、シミュレーション装置をこのように構成することによりさらに高速なシミュレーションを実行することができる。
【0070】
さらに、起動情報ファイル101に、速度優先のシミュレーションを行なうか、または精度優先のシミュレーションを行なうかの情報を組み込むことによって、起動時にシミュレーション実行管理部102で起動情報ファイルから読み込んだ情報から判断して、ユーザの希望する精度、速度でシミュレーションを実行することが可能となる。また、速度優先から精度優先に切り替えるタイミングまたは精度優先から速度優先に切り替えるタイミングの情報を追加すれば、速度優先と精度優先のシミュレーションを組み合わせて実行することも可能となる。
【0071】
【発明の効果】
以上のように、本発明を適用することにより、異なる動作周波数を持つプロセッサコアをそれぞれに含む複数のマイクロコンピュータシステムの同時動作をシミュレーションが可能となる。これにより、異なる動作周波数を持つマイクロコンピュータシステム間でデータ、クロック、割込等の信号の送受信がある場合においても、それぞれのマイクロコンピュータシステムの動作を正しくシミュレーションすることが可能となる。さらに、基準動作時間の設定を調整することにより動作の同時性の精度を重視するか、またはシミュレーション速度を優先するかをシミュレーションの目的に応じて選択することができるので、本発明の利用価値は大きい。
【図面の簡単な説明】
【図1】本発明のシミュレーション装置の一実施の形態のブロック図である。
【図2】本発明の動作を説明するためのブロック図である。
【図3】本発明のシミュレーション装置の動作を示すフロー図である。
【図4】第1の実施例の動作中の各ブロックの状態を示す図である。
【図5】第1の実施例の動作中の各ブロックの状態を示す図である。
【図6】第1の実施例の動作中の各ブロックの状態を示す図である。
【図7】第1の実施例の動作中の各ブロックの状態を示す図である。
【図8】第1の実施例の動作中の各ブロックの状態を示す図である。
【図9】第1の実施例の動作中の各ブロックの状態を示す図である。
【図10】第2の実施例の動作中の各ブロックの状態を示す図である。
【図11】第2の実施例の動作中の各ブロックの状態を示す図である。
【図12】第2の実施例の動作中の各ブロックの状態を示す図である。
【図13】第2の実施例の動作中の各ブロックの状態を示す図である。
【図14】第2の実施例の動作中の各ブロックの状態を示す図である。
【図15】第2の実施例の動作中の各ブロックの状態を示す図である。
【図16】本発明のシミュレーション装置の第3の実施例のブロック図である。
【図17】本発明のシミュレーション装置の第4の実施例のブロック図である。
【図18】本発明のシミュレーション装置の第5の実施例のブロック図である。
【図19】従来のシミュレーション装置のブロック図である。
【符号の説明】
101  起動情報ファイル
102,302,402  シミュレーション実行管理部
103  シミュレータ起動手段
104,304  システム間同期情報管理手段
105,106,305,306  時間管理手段
107  基準動作時間格納手段
108,408  バス制御手段
111a,111b,111c,111d,411a,411b,511a,511b  シミュレーション部
112a,112b,112c,112d  プロセッサシミュレート手段
114a,114b,114c,114d  同期情報管理手段
115a,115b,115c,115d  プログラム/データメモリ
121a,121b,121c,121d,421a,421b,521a,521b  周辺回路シミュレート手段
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a software simulation device for simulating the execution of a program by a processor, and more particularly to a simulation device and a simulation method for simulating the simultaneous execution of a program in a plurality of systems each including a processor.
[0002]
[Prior art]
A conventional microcomputer software simulation device is described in JP-A-2000-276502. In this conventional example, as shown in FIG. 19, a simulation unit 611 includes a processor simulation unit 612, a synchronization information management unit 614, a program / data memory 615, an external interrupt generation unit 616, and a peripheral circuit simulation unit. 621 are provided. The peripheral circuit simulator 621 includes a peripheral circuit simulator activation / management unit 613, an I / O register memory area 617, a timer circuit simulator 618, a parallel input / output circuit simulator 619, and a serial input / output circuit simulator. It has.
[0003]
The simulation unit 611 of the conventional software simulation device having such a configuration operates as follows. That is, the processor simulating means 612 loads the program from the program / data memory 615 and executes the loaded instruction for each step. The external interrupt generation unit 616 notifies the processor simulation unit 612 that the interrupt has been input. When notified that an interrupt has been input from the external interrupt generation unit 616, the processor simulation unit 612 performs an interrupt process. The peripheral circuit simulator activation / management unit 613 manages peripheral circuit execution file information for a peripheral circuit included in the microcomputer. The peripheral circuit simulator activation / management unit 613 activates each of the registered peripheral circuit simulators based on the peripheral circuit execution file information managed when the simulation unit 611 is activated. The synchronization information management means 614 provides the processor simulation means 612 and the activated peripheral circuit simulators (parallel input circuit simulator 619, serial input / output circuit simulator 620, and timer circuit simulator 618) with minimum timing information for processor simulation. Provides clock information. The simulation unit 611 and each peripheral circuit simulator input / output data via the I / O register memory area 617. Communication with the outside is simulated by the parallel input / output circuit simulator 619 or the serial input / output circuit simulator 620 opening an input data file and an output data file prepared in advance.
[0004]
[Problems to be solved by the invention]
However, the conventional example of FIG. 19 basically simulates the operation of a microcomputer system including a single processor core. In the case of the simulation of a plurality of microcomputer systems in which the processor core operates at the same frequency, Although it may be possible to extend the application to simulations in special cases such as when the processor cores operate at different frequencies but each system operates independently, multiple processors each including processor cores with different operating frequencies It was virtually impossible to simulate the simultaneous operation of these systems.
[0005]
The present invention has been made in view of the above situation, and an object of the present invention is to provide a simultaneous simulation device for a plurality of processors that can simulate the simultaneous operation of a plurality of systems each including a processor core having a different operation frequency. It is to provide a simultaneous simulation method.
[0006]
[Means for Solving the Problems]
According to a first aspect of the present invention, there is provided a simulation apparatus comprising: a plurality of system simulation units each provided with processor simulation means for performing an instruction execution simulation; and a simulation of a system simulation unit provided corresponding to each of the plurality of system simulation units. A system time management means for managing the progress of the operation, and a time which is set within a range of not more than the largest one clock time and not less than the smallest one clock time among one clock time corresponding to the cycle of the operation clock of each of the plurality of system simulation units. Means for storing the reference operation time, and a simulation execution management unit for controlling the order of simulation execution of the plurality of system simulation units in a predetermined order for each reference operation time. The system simulation unit further includes a peripheral circuit simulation unit that simulates the operation of a peripheral circuit activated in response to the instruction execution of the processor simulation unit, and the simulation execution management unit further includes a peripheral circuit simulation unit of the system simulation unit. And a bus control means for controlling input and output between them.
[0007]
A simulation method according to a second invention of the present invention is a method for simulating the execution of a program in a plurality of systems by using a computer, wherein one clock time corresponding to a cycle is calculated from an assumed clock frequency of each of the plurality of systems. A first procedure for selecting and setting a reference operation time within a range of not more than the largest one clock time and not less than the smallest one clock time, and an internal clock provided for each of the plurality of systems. A second procedure of adding the reference operation time to the stored time, and a third procedure of simulating the program execution by the number of clocks included in the internal clock corresponding to each of the plurality of systems. It is characterized by having. The third procedure includes a first sub-step of determining whether the time stored in the internal clock is equal to or longer than one clock time of the system to be simulated, and a step of determining whether or not the number of insufficient clocks is recorded. When the instruction simulation is performed by the number of clocks included in the clock and the number of insufficient clocks is recorded, the second sub that proceeds to simulate the instruction by the number of clocks obtained by subtracting the number of insufficient clocks from the number of clocks included in the internal clock. And a third sub-step of storing an insufficient number of clocks as an insufficient number of clocks when the number of clocks is insufficient for the instruction to be executed in the second sub-step, The steps may be configured to be performed on the plurality of systems in a predetermined order.
[0008]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following description shows embodiments of the present invention, and the present invention is not construed as being limited to the following description.
[0009]
FIG. 1 is a block diagram of an embodiment of the simulation apparatus according to the present invention. The simulation device of FIG. 1 simulates the simultaneous operation of two microcomputer systems each including a processor core, a program / data memory, and peripheral circuits.
[0010]
The system A simulation unit 111a includes a processor simulation unit 112a, a synchronization information management unit 114a, a program / data memory 115a, an external interrupt generation unit 116a, and a peripheral circuit simulation unit 121a. The peripheral circuit simulator 121a includes a peripheral circuit simulator start / management unit 113a, a timer circuit simulator 118a, a parallel input / output circuit simulator 119a, a serial input / output circuit simulator 120a, and an I / O register memory area 117a.
[0011]
Similarly, the system B simulation unit 111b includes a processor simulation unit 112b, a synchronization information management unit 114b, a program / data memory 115b, an external interrupt generation unit 116b, and a peripheral circuit simulation unit 121b. The peripheral circuit simulator 121b includes a peripheral circuit simulator activation / management unit 113b, a timer circuit simulator 118b, a parallel input / output circuit simulator 119b, a serial input / output circuit simulator 120b, and an I / O register memory area 117b.
[0012]
The simulation execution management unit 102 controls a simulation execution operation in the system A simulation unit 111a and a simulation execution operation in the system B simulation unit 111b. The simulation execution management unit 102 includes a simulator activation unit 103, an inter-system synchronization information management unit 104, and a bus control unit 108.
[0013]
The processor simulation means 112a in the system A simulation unit 111a loads a program from the program / data memory 115a under the control of the simulation execution management unit 102, and executes the loaded instruction for each step. The external interrupt generation means 116a notifies the processor simulation means 112a when an interrupt is input from the bus control means 108 or the input data file. The processor simulating means 112a performs an interrupt process when notified that an interrupt has been input from the external interrupt generating means 116a. The peripheral circuit simulator activation / management means 113a manages peripheral circuit execution file information for the peripheral circuits provided in the microcomputer system A, and based on the managed peripheral circuit execution file information when the system A simulation unit 111a is activated. Start each peripheral circuit simulator registered in. The synchronization information management means 114a supplies clock information to the processor simulating means 112a and the activated peripheral circuit simulators (parallel input circuit simulator 119a, serial input / output circuit simulator 120a, and timer circuit simulator 118a). The system A simulation unit 111a and each peripheral circuit simulator input and output data via the I / O register memory area 117a. For communication with the outside, the parallel input / output circuit simulator 119a or the serial input / output circuit simulator 120a opens the input data file and the output data file prepared in advance, or the parallel input / output circuit simulator 119a or the serial input / output circuit Simulation is performed by the simulator 120a transmitting and receiving data via the bus control means 108.
[0014]
Similarly, the processor simulation means 112b in the system B simulation unit 111b loads a program from the program / data memory 115b under the control of the simulation execution management unit 102, and executes the loaded instruction for each step. The external interrupt generating means 116b notifies the processor simulating means 112b when an interrupt is input from the bus control means 108 or the input data file. The processor simulating means 112b performs an interrupt process when notified that an interrupt has been input from the external interrupt generating means 116b. The peripheral circuit simulator activation / management means 113b manages peripheral circuit execution file information for peripheral circuits provided in the microcomputer system B, and based on the managed peripheral circuit execution file information when the system B simulation unit 111b is activated. Start each peripheral circuit simulator registered in. The synchronization information management unit 114b supplies clock information to the processor simulation unit 112b and the activated peripheral circuit simulators (parallel input circuit simulator 119b, serial input / output circuit simulator 120b, and timer circuit simulator 118b). The system B simulation unit 111b and each peripheral circuit simulator input and output data via the I / O register memory area 117b. The communication with the outside can be performed by opening the input data file and the output data file prepared in advance by the parallel input / output circuit simulator 119b or the serial input / output circuit simulator 120b, or by opening the parallel input / output circuit simulator 119b or the serial input / output circuit. The simulation is performed by the simulator 120b transmitting and receiving data via the bus control means 108.
[0015]
In the present embodiment, the peripheral circuit simulator included in the peripheral circuit simulation unit 121a in the system A simulation unit 111a and the peripheral circuit simulator included in the peripheral circuit simulation unit 121b in the system B simulation unit 111b have the same function. Although a simulator is provided, it is not limited to the same for the sake of simplicity of explanation.
[0016]
First, the overall operation of the simulation apparatus of the present invention will be outlined with reference to FIG. When the simulation device is started by sending a start instruction to the simulator start unit 103 from outside, the simulation execution management unit 102 opens the start information file 101 described by the user, and the system A simulation unit 111a to start and the system B simulation Activate the unit 111b and know the respective assumed operating clock frequencies. The simulation execution management unit 102 also controls the output state from the bus control unit 108 to the external interrupt generation units 116a and 116b, and the input / output between the bus control unit 108, the parallel input / output circuit simulator 119a, and the serial input / output circuit simulator 120a. The path and the input / output path between the bus control unit 108, the parallel input / output circuit simulator 119b, and the serial input / output circuit simulator 120b are grasped.
[0017]
Next, the inter-system synchronization information management unit 104 calculates one clock time corresponding to the period of the assumed operation clock from the assumed operation clock frequency of the system A simulation unit 111a and the assumed operation clock frequency of the system B simulation unit 111b, respectively. If the reference operation time specified in the file 101 is within the range of the two calculated one clock times, the specified reference operation time is stored in the reference operation time storage unit 107. Alternatively, either the smaller one clock time or the larger one clock time may be set as the reference operation time. The system A time management unit 105 calculates and holds one clock time of the system A simulation unit 111a from the assumed operation clock frequency of the system A simulation unit 111a, and the system B time management unit 106 stores one clock time of the system B simulation unit 111b. Is calculated from the assumed operation clock frequency of the system B simulation unit 111b and held.
[0018]
Hereinafter, the simulation of the system A simulation unit 111a and the simulation of the system B simulation unit 111b are performed for each reference operation time. In that case, the simulation execution order is as follows. It is preferable that the simulation execution management unit 102 controls the system so that the system with the larger value is performed later. When data sent from a system with a smaller one-clock time is received by a system with a larger one-clock time, if the system with the larger one-clock time is simulated in advance, no data is sent at the time when it should be received. This can occur.
[0019]
When the simulation in the system A simulation unit 111a is started, the system A time management unit 105 executes one clock time of the system A simulation unit 111a and the execution time stored in the internal clock in the system A time management unit 105. The available time is compared, and if the executable time of the internal clock is one clock time or more, the synchronization information management unit 114a in the system A simulation unit 111a is notified that the clock is advanced by one clock.
[0020]
The synchronization information management means 114a, which is notified of the progress of the time for one clock time, advances the time for one clock time to the processor simulating means 112a, and the processor simulating means 112a transmits the program from the program / data memory 115a. And simulate the instruction. Subsequently, the processor simulating unit 112a transmits the number of clocks required for executing the instruction to the synchronization information managing unit 114a. The synchronization information management means 114a does nothing even if the progress of time is notified from the system A time management means 105 during the number of clocks required for execution of the instruction.
[0021]
When the operation of the peripheral circuit simulator is accompanied as a result of simulating the execution of the program by the processor simulating means 112a, the processor simulating means 112a sends the peripheral circuit simulator activation / management means 113a in the peripheral circuit simulating means 121a. The start of the corresponding peripheral circuit simulator is notified, and a simulation of an instruction is requested to any of the I / O register memory area 117a, the timer circuit simulator 118a, the parallel input / output circuit simulator 119a, and the serial input / output circuit simulator 120a. Of the outputs from the peripheral circuit simulators, those accepted by the bus control means 108 are held by the bus control means 108, and the other outputs are held in output data files. Also, of the external circuit simulator inputs, those which can be input from the bus control means 108 hold input data in the bus control means 108, and the others which are input from the input data file. The external interrupt generation means 116a determines that an interrupt has been received from the bus control means 108 and the input data file 152, and notifies the processor simulation means 112a.
[0022]
Next, switching from the execution of the simulation by the system A simulation unit 111a to the execution of the simulation by the system B simulation unit 111b in the same time zone will be described. When the synchronization information management unit 114a of the system A simulation unit 111a notifies the inter-system synchronization information management unit 104 that the instruction execution processing in the processor simulation unit 112a has been completed, the system B time management unit 106 holds the information. One clock time of the system B simulation unit 111b is compared with the executable time stored in the internal clock in the inter-system synchronization information management means 104. If the executable time of the internal clock is one clock time or more, the system The synchronization information management unit 114b in the B simulation unit 111b notifies the synchronization information management unit 114b of the advance of one clock, and the synchronization information management unit 114b, which is notified of the progress of the time of one clock time, sends one clock time to the processor simulation unit 112b. Minutes to proceed Simulating means 112b loads the program from the program / data memory 115b, to simulate the instruction. Thereafter, the same operation as that described for the system A simulation unit 111a is executed in the system B simulation unit 111b.
[0023]
FIG. 2 is a block diagram obtained by adding a convenient modification to FIG. 1 in order to explain the operation of the present embodiment. The whole is simplified (partially omitted), and the internal structure of the inter-system synchronization information management means 104 is shown in more detail than FIG. The inter-system synchronization management unit 104 includes a system A time management unit 105, a system B time management unit 106, and a reference operation time storage unit 107. The system A time management means 105 has a one-clock time storage 201 for storing one clock time of the processor of the microcomputer system A, and an internal clock 202 for storing executable time. Similarly, the system B time management means 106 has a one-clock time storage 203 for storing one clock time of the processor of the microcomputer system B, and an internal clock 204 for storing executable time. When the reference operation time specified in the startup information file 101 satisfies a predetermined condition, the reference operation time storage unit 107 stores the reference operation time. Alternatively, one of the one clock time stored in the one clock time storage 201 and the one clock time stored in the one clock time storage 203 may be selected as the reference operation time.
[0024]
FIG. 3 is a flowchart showing the operation of the simulation apparatus according to the present embodiment. FIGS. 4 to 9 show states of the respective blocks in FIG. 2 in the first embodiment in which the processor of the microcomputer system A operates at a clock of 40 MHz and the processor of the microcomputer system B operates at a clock of 20 MHz. It is. The overall operation flow will be described with reference to FIG. Thereafter, the operation of the simulation apparatus of the present invention will be described in detail with reference to the states of the respective blocks in the first embodiment shown in FIGS. FIG. 3 is a flowchart when the assumed operating frequency of the system A is higher than the operating frequency of the system B.
[0025]
First, in step S1 of FIG. 3, the simulation apparatus calculates one clock time from the operating frequency for each system to be simulated, and stores one clock time storage 201 of the system A time management unit 105 and one clock time of the system B time management unit 106. The clock time is stored in the clock time storage 203, the reference operation time is set in the reference operation time storage means 107, and the number of insufficient clocks corresponding to each system is initialized to zero. Next, the process proceeds to step S2, where the reference operation time is added to the internal clock 202 of the system A time management unit 105 and the internal clock 204 of the system B time management unit 106, respectively. Next, the process proceeds to step S3, where a simulation of the system A is executed. Step S3 includes sub-steps S31 to S38.
[0026]
In sub-step S31, it is determined whether or not the time stored in the internal clock 202 is equal to or longer than one clock time of the system A. If it is determined that the time is equal to or longer than one clock time, the process proceeds to sub-step S32.
[0027]
In sub-step S32, the time stored in the internal clock 202 is divided by the one clock time stored in the one-clock time storage 201 to calculate a quotient and a remainder. Next, in sub-step S33, if the number of insufficient clocks is held in the synchronization information management means 114a in the system A simulation unit 111a, it is determined whether or not the obtained quotient is larger than the number of insufficient clocks. If it is determined that the number is larger than the number of insufficient clocks, the process proceeds to sub-step S35.
[0028]
In the sub-step S35, the remainder calculated in the sub-step S32 is stored in the internal clock 202, and the instruction is issued to the synchronization information management unit 114a in the system A simulation unit 111a. If the number of insufficient clocks or the number of extra clocks is held in the synchronization information management unit 114a, ((the number of clocks required for instruction execution + the number of insufficient clocks)-(quotient + the number of extra clocks)) is calculated. . Next, the process proceeds to sub-step S36, where it is determined whether the calculated value is negative. If it is determined to be negative, the process proceeds to sub-step S38, where the quotient is cleared to 0, the value calculated in sub-step S35 is held in the synchronization information management means 114a as an extra clock number, and the process returns to sub-step S35.
[0029]
If it is determined in sub-step S31 that the time stored in the internal clock 202 is less than the reference operation time, the process proceeds to sub-step S37. If it is determined in sub-step S33 that the quotient is equal to or less than the number of insufficient clocks, the process proceeds to sub-step S34, and a value obtained by subtracting the quotient from the number of insufficient clocks held in the synchronization information management means 114a is newly calculated. After updating as the number of clocks, the process proceeds to sub-step S37. If it is determined in step S36 that the value is not negative, the process proceeds to step S37. In sub-step S37, the number of insufficient clocks is held in the synchronization information management means 114a, and the step S3 ends.
[0030]
Next, the process proceeds to step S4, where a simulation of the system B is executed. Step S4 includes sub-steps S41 to S48.
[0031]
In sub-step S41, it is determined whether or not the time stored in the internal clock 204 is equal to or longer than one clock time of the system B. If it is determined that the time is equal to or longer than one clock time, the process proceeds to sub-step S42.
[0032]
In sub-step S42, the time stored in the internal clock 204 is divided by the one clock time stored in the one-clock time storage 203 to calculate a quotient and a remainder. Next, proceeding to sub-step S43, if the number of insufficient clocks is held in the synchronization information management means 114b in the system B simulation unit 111b, it is determined whether or not the obtained quotient is larger than the number of insufficient clocks. If it is determined that the number is larger than the number of insufficient clocks, the process proceeds to sub-step S45.
[0033]
In the sub-step S45, the remainder calculated in the sub-step S42 is stored in the internal clock 202, and the execution of the instruction is instructed to the synchronization information management unit 114b in the system B simulation unit 111b. If the number of insufficient clocks or the number of extra clocks is held in the synchronization information management means 114b, ((number of clocks required for executing the instruction + number of insufficient clocks)-(quotient + number of extra clocks)) is calculated. . Next, the process proceeds to sub-step S46, where it is determined whether the calculated value is negative. If it is determined to be negative, the process proceeds to sub-step S48, the quotient is cleared to 0, the value calculated in sub-step S45 is held in the synchronization information management means 114b as the number of extra clocks, and the process returns to sub-step S45.
[0034]
If it is determined in sub-step S41 that the time stored in the internal clock 204 is less than the reference operation time, the process proceeds to sub-step S47. If it is determined in sub-step S43 that the quotient is equal to or less than the number of insufficient clocks, the process proceeds to sub-step S44, in which a value obtained by subtracting the quotient from the number of insufficient clocks held in the synchronization information management means 114b is added to the new insufficient clock. After updating the number of clocks, the process proceeds to sub-step S47. If it is determined that the value is not negative in sub-step S46, the process proceeds to sub-step S47. In the sub-step S47, the number of insufficient clocks is held in the synchronization information management means 114b, and the step S4 ends.
[0035]
In the next step S5, it is determined whether or not simulation of all instructions has been completed for the program to be simulated. If it is determined that the simulation has not been completed, the process returns to step S2 to continue the simulation. If it is determined that the simulation has been completed, the simulation ends.
[0036]
If either system is stopped for some reason, the simulation of only the operating system is continued.
[0037]
In the first embodiment of FIGS. 4 to 9, the simulation execution management unit 102 synchronizes the system A simulation unit 111a operating at the assumed operation clock frequency of 40 MHz and the system B simulation unit 111b operating at the assumed operation clock frequency of 20 MHz. This is an embodiment in which the operation is performed and the emphasis is placed on the accuracy of the simultaneous operation.
[0038]
More specifically, referring to FIG. 4, in step S1, the simulation execution management unit 102 reads the activation information file 101 and activates the system A simulation unit 111a and the system B simulation unit 111a. The inter-system synchronization information management unit 104 calculates one clock time (25 ns) from the assumed operation clock frequency of 40 MHz of the system A simulation unit 111a and stores it in the one-clock time storage 201 of the system A time management unit 105. Similarly, the inter-system synchronization information management unit 104 calculates one clock time (50 ns) from the assumed operation clock frequency of 20 MHz of the system B simulation unit 111b and stores it in the one-clock time storage 203 of the system B time management unit 106. Further, the simulation execution management unit 102 stores the one-clock time storage 201 of the system A time management unit 105 and the one-clock time storage 203 of the system B time management unit 106 in order to execute the simulation with emphasis on the accuracy of the simultaneous operation. Is selected, ie, 25 ns, which is smaller than one clock time stored in the reference operation time, and stored in the reference operation time storage means 107 as the reference operation time.
[0039]
In step S2, the simulation execution management unit 102 notifies the system A time management unit 105 and the system B time management unit 106 that the simulation is to be advanced by the reference operation time stored in the reference operation time storage unit 107. As shown in (1), the system A time management means 105 adds and stores the reference operation time to the value stored in the internal clock 202, and the system B time management means 106 adds the reference operation time to the time stored in the internal clock 204. And memorize. Assuming that 0 is stored in each of the internal clocks 202 and 204, 25 ns is stored in each of the internal clocks 202 and 204 since the reference operation time is 25 ns which is equal to one clock time of the system A.
[0040]
In step S3, a simulation of the system A is performed. In sub-step S31, the time (25 ns) stored in the internal clock 202 of the system A time management means 105 is equal to the one clock time (25 ns) stored in the one-clock time storage 201. The remainder becomes 0 with 1. In sub-step S33, since the number of insufficient clocks is 0, the process proceeds to sub-step S35, where the remainder 0 is stored in the internal clock 202 as shown in FIG. 5, and is sent to the synchronization information management unit 114a in the system A simulation unit 111a. Instruct the execution of the instruction.
[0041]
In sub-step S35, the synchronization information management means 114a in the system A simulation unit 111a issues an instruction execution request to the processor simulation means 112a as shown in FIG. The processor simulating means 112a reads and executes one instruction from the program / data memory 115a, and notifies the synchronous information managing means 114a of the number of clocks required for executing the instruction. Here, for example, it is assumed that a SET1 instruction, which is a bit set instruction, is executed, and the execution of the SET1 instruction requires three clocks. As shown in FIG. 5, the synchronization information management means 114a urges the peripheral circuit simulation means 121a to execute the SET1 instruction for three clocks, subtracts the quotient 1 from the instruction execution clock number 3, and executes the clock deficiency. To get 2. Since there is no extra clock here, the peripheral circuit simulating means 121a simulates the operation for three clocks obtained by adding 2 of the number of insufficient clocks to one clock. Subsequently, in sub-step 36, since the value held by the synchronization information management unit 114a is not negative, the process proceeds to sub-step S37, where 2 is held as the number of insufficient clocks as shown in FIG. Is transmitted to the simulation execution management unit 102.
[0042]
Subsequently, the process proceeds to step S4, where a simulation of the system B is performed. In sub-step S41, the system B time management unit 106 compares the operable time stored in the internal clock 204 with one clock time in the one clock time storage 203. As shown in FIG. 6, since the operable time (25 ns) is shorter than one clock time (50 ns), the process proceeds to sub-step S47, in which the number of insufficient clocks is kept at 0, and the simulation processing for the reference operation time is performed in step 4 To the simulation execution management unit 102.
[0043]
In step S5, since the number of insufficient clocks is held in the synchronization information management unit 114a of the system A simulation unit 111a, it is determined that the execution of the instruction has not been completed, and the process returns to step S2 to continue the simulation.
[0044]
In step S2, the simulation execution management unit 102 informs the system A time management unit 105 and the system B time management unit 106 that the simulation is to be advanced by the reference operation time stored in the reference operation time storage unit 107. As shown in (1), the system A time management means 105 adds and stores the reference operation time to the value stored in the internal clock 202, and the system B time management means 106 adds the reference operation time to the time stored in the internal clock 204. And memorize.
[0045]
In step S3, the simulation of the system A is performed. In sub-step S31, the time (25 ns) stored in the internal clock 202 of the system A time management means 105 is equal to the one clock time (25 ns) stored in the one-clock time storage 201. The remainder becomes 0 with 1. In sub-step S33, the number of insufficient clocks is 0, so the process proceeds to sub-step S35, where the remainder 0 is stored in the internal clock 202 as shown in FIG. 8, and the synchronization information management unit 114a in the system A simulation unit 111a When the synchronization information management means 114a in the system A simulation unit 111a has the insufficient number of clocks as shown in FIG. 8, the processor simulation means 112a and the peripheral circuit simulation means 113a Do not notify anything. Accordingly, since no new instruction is executed in the processor simulating means 112a or the peripheral circuit simulating means 113a, the number of instruction clocks is 0, the number of insufficient clocks is 2, the quotient is 1, and the number of extra clocks is 0. The calculated value is 1. Since it is not negative in sub-step S36, the process proceeds to sub-step S37, and the synchronization information management unit 114a in the system A simulation unit 111a newly holds 1 as the number of insufficient clocks. That is, in the case of FIG. 8, the information on the number of insufficient clocks held by the synchronization information management unit 114a is updated from 2 to 1, and the end of step 3, which is the simulation processing for the reference operation time, is notified to the simulation execution management unit 102.
[0046]
Subsequently, the process proceeds to step S4, where a simulation of the system B is performed. In sub-step S41, as shown in FIG. 8, the time (50 ns) stored in the internal clock 204 of the system B time management means 106 is equal to the one clock time (50 ns) stored in the one clock time storage 203. Proceeding to sub-step S42, the quotient is 1 and the remainder is 0. Since the number of insufficient clocks is 0 in sub-step S43, the process proceeds to sub-step S45, where the remainder 0 is stored in the internal clock 202, as shown in FIG. 9, and is transmitted to the synchronization information management unit 114b in the system B simulation unit 111b. Instruct the execution of the instruction.
[0047]
The synchronization information management unit 224 in the system B simulation unit 111b issues an instruction execution request to the processor simulation unit 112b, and the processor simulation unit 112b fetches one instruction from the program / data memory 115b and executes it. The processor simulating unit 112 b notifies the synchronization information managing unit 224 of the number of clocks required for executing the instruction. Here, it is assumed that, for example, a NOP instruction which is a no-operation instruction is executed, and the execution of the NOP instruction takes one clock. As shown in FIG. 9, the synchronization information management unit 114b prompts the peripheral circuit simulation unit 121b to execute the NOP instruction for one clock, and subtracts a value 0 obtained by subtracting a quotient 1 from 1 which is the number of instruction execution clocks. Reserved as the number of insufficient clocks. Here, since there is no extra clock, the peripheral circuit simulating means 121b simulates the operation for one clock obtained by adding 0 of the number of insufficient clocks to one clock. Subsequently, in sub-step 46, since the value held by the synchronization information management unit 114b is not negative, the process proceeds to sub-step S47, where 0 is held as the number of insufficient clocks as shown in FIG. Is transmitted to the simulation execution management unit 102.
[0048]
Then, the process proceeds to step S5, where the synchronization information management unit 114a of the system A simulation unit 111a stores the number of insufficient clocks. Therefore, it is determined that the execution of the instruction is not completed, and the process returns to step S2 to continue the simulation. . By repeating the operation as described above, the simulation apparatus of the present invention can simulate the simultaneous operation of the microcomputer system A and the microcomputer system B each including the processor cores having different operation frequencies.
[0049]
Next, the operation of the second embodiment in which the simulation is executed with priority given to the simulation speed will be described with reference to FIGS. In the second embodiment, the simulation execution management unit 102 controls and simulates the system A simulation unit 111a operating at the assumed operation clock frequency of 10 MHz and the system B simulation unit 111b operating at the assumed operation clock frequency of 1 MHz at the same time.
[0050]
First, in step S1, the simulation execution management unit 102 reads the activation information file 101 and activates the system A simulation unit 111a and the system B simulation unit 111a. The inter-system synchronization information management unit 104 calculates one clock time (100 ns) from the assumed operation clock frequency of 10 MHz of the system A simulation unit 111a and stores it in the one-clock time storage 201 of the system A time management unit 105. Similarly, the inter-system synchronization information management unit 104 calculates one clock time (1000 ns) from the assumed operation clock frequency of 1 MHz of the system B simulation unit 111b and stores it in the one-clock time storage 203 of the system B time management unit 106. Further, the simulation execution management unit 102 stores the one-clock time storage 201 of the system A time management unit 105 and the one-clock time storage 203 of the system B time management unit 106 in order to execute the simulation with priority given to the simulation speed. The larger one of the one clock time, that is, 1000 ns is selected and stored in the reference operation time storage means 107 as the reference operation time as shown in FIG.
[0051]
In step S2, the simulation execution management unit 102 informs the system A time management unit 105 and the system B time management unit 106 that the simulation is to be advanced by the reference operation time stored in the reference operation time storage unit 107. As shown in (1), the system A time management means 105 adds and stores the reference operation time to the value stored in the internal clock 202, and the system B time management means 106 adds the reference operation time to the time stored in the internal clock 204. And memorize. Assuming that 0 is stored in each of the internal clocks 202 and 204, here, the reference operation time is 1000 ns, which is equal to one clock time of the system B, so that 1000 ns is stored in each.
[0052]
In step S3, a simulation of the system A is performed. In the sub-step S31, the time (1000 ns) stored in the internal clock 202 of the system A time management means 105 is compared with the one clock time (100 ns) stored in the one-clock time storage 201. The quotient is 10 and the remainder is 0. In sub-step S33, the number of insufficient clocks is 0, so the process proceeds to sub-step S35, where the remainder 0 is stored in the internal clock 202 as shown in FIG. 11, and the synchronization information management unit 114a in the system A simulation unit 111a is Instruct the execution of the instruction.
[0053]
In addition, in sub-step S35, the synchronization information management unit 114a in the system A simulation unit 111a issues an instruction execution request to the processor simulation unit 112a as shown in FIG. The processor simulating means 112a fetches one instruction from the program / data memory 115a and executes it, and notifies the synchronization information managing means 114a of the number of clocks required for executing the instruction. Here, for example, it is assumed that a SET1 instruction, which is a bit set instruction, is executed, and the execution of the SET1 instruction requires three clocks. As shown in FIG. 11, the synchronization information management unit 114a urges the peripheral circuit simulation unit 121a to execute the SET1 instruction for three clocks, and subtracts a quotient of 10 from the instruction execution clock number of 3 (− 7) In sub-step 36, since the value held by the synchronization information management unit 114a is negative, the process proceeds to sub-step S38, where the quotient is cleared to 0, and then, as shown in FIG. I do. A negative sign indicates an extra clock.
[0054]
Since the extra clock number is held in the synchronization information management unit 114a, the process returns to the sub-step S35, and subsequently, the synchronization information management unit 114a issues an instruction execution request to the processor simulation unit 112a. The processor simulating means 112a executes the next one instruction, and notifies the synchronization information managing means 114a of the number of clocks required for executing the instruction. As a next instruction, a JMP instruction which is an instruction of a register indirect unconditional branch is executed, and it takes three clocks to execute the JMP instruction. As shown in FIG. 12, the synchronization information management unit 114a subtracts 7 as the number of extra clocks from 3 as the number of instruction execution clocks of the JMP instruction to obtain (−4). Subsequently, the process proceeds from sub-step 36 to sub-step 38, where the synchronization information management means 114a holds (-4) as the number of extra clocks.
[0055]
Since the extra clock number is held in the synchronization information management unit 114a, the process returns to the sub-step S35, and subsequently, the synchronization information management unit 114a issues an instruction execution request to the processor simulation unit 112a. The processor simulating means 112a executes the next one instruction, and notifies the synchronization information managing means 114a of the number of clocks required for executing the instruction. Since the SET1 instruction is executed as the next instruction, and the execution of the SET1 instruction requires three clocks, the synchronization information management unit 114a calculates the number of extra clocks from three, which is the instruction execution clock number of the SET1 instruction, as shown in FIG. A certain 4 is subtracted to obtain (−1). Subsequently, the process proceeds from sub-step 36 to sub-step 38, where the synchronization information management means 114a holds (-1) as the number of extra clocks.
[0056]
Since the extra clock number is held in the synchronization information management unit 114a, the process returns to the sub-step S35, and subsequently, the synchronization information management unit 114a issues an instruction execution request to the processor simulation unit 112a. The processor simulating means 112a executes the next one instruction, and notifies the synchronization information managing means 114a of the number of clocks required for executing the instruction. As a next instruction, an RET1 instruction which is a return instruction from an interrupt routine or the like is executed, and it takes three clocks to execute the RET1 instruction. As shown in FIG. 14, the synchronization information management means 114a subtracts 1 as an extra clock number from 3 as an instruction execution clock number of the RET1 instruction to obtain 2 as an insufficient clock number. Here, since the extra clock has been eliminated, the peripheral circuit simulating means simulates the operation for 12 clocks obtained by adding the number of insufficient clocks 2 to 10 clocks corresponding to the quotient of the sub-step 35. Thereafter, since the value is positive in the sub-step S46, the process proceeds to the sub-step S47, and as shown in FIG. 14, the synchronization information management unit 114a in the system A simulation unit 111a holds 2 as the number of insufficient clocks and performs the reference operation. The end of step 3, which is the simulation processing for the time, is transmitted to the simulation execution management unit 102.
[0057]
Subsequently, the process proceeds to step S4, where a simulation of the system B is performed. In sub-step S41, as shown in FIG. 15, the time (1000 ns) stored in the internal clock 204 of the system B time management means 106 is equal to the one clock time (1000 ns) stored in the one clock time storage 203. Proceeding to sub-step S42, the quotient is 1 and the remainder is 0. In sub-step S43, since the number of insufficient clocks is 0, the process proceeds to sub-step S45, where the remainder 0 is stored in the internal clock 202 as shown in FIG. 15, and is sent to the synchronization information management unit 114b in the system B simulation unit 111b. Instruct the execution of the instruction.
[0058]
The synchronization information management unit 224 in the system B simulation unit 111b issues an instruction execution request to the processor simulation unit 112b, and the processor simulation unit 112b fetches one instruction from the program / data memory 115b and executes it. The processor simulating means 112b notifies the synchronization information managing means 114b of the number of clocks required for executing the instruction. Here, for example, the next instruction is a NOP instruction, and it takes one clock to execute the NOP instruction. As shown in FIG. 15, the synchronization information management unit 114b prompts the peripheral circuit simulation unit 121b to execute the NOP instruction for one clock, and subtracts a value 0 obtained by subtracting a quotient of 1 from 1 which is the number of instruction execution clocks. Reserved as the number of insufficient clocks. Here, since there is no extra clock, the peripheral circuit simulating means 121b simulates the operation for one clock obtained by adding 0 of the number of insufficient clocks to one clock. In sub-step 46, since the value held by the synchronization information management unit 114b is not negative, the process proceeds to sub-step S47, where 0 is held as the number of insufficient clocks as shown in FIG. The end of step S4 is notified to the simulation execution management unit 102.
[0059]
Then, the process proceeds to step S5, where the synchronization information management unit 114a of the system A simulation unit 111a stores the number of insufficient clocks. Therefore, it is determined that the execution of the instruction is not completed, and the process returns to step S2 to continue the simulation. . By repeating the operation as described above, in the second embodiment, as in the first embodiment, the simultaneous operation of the microcomputer system A and the microcomputer system B each including the processor core having a different operation frequency is simulated. can do. In addition, in the case where the first embodiment using the smaller one clock time as the reference operation time is applied to a system having the same combination of the clock frequency as the present embodiment, steps S2 to S2 in FIG. Although S4 needs to be repeated four times in total, in the present embodiment, since the larger one clock time is used as the reference operation time, the same simulation can be performed only by performing the processing of steps S2 to S4 in FIG. 3 once. Therefore, the simulation time can be reduced.
[0060]
Next, a third embodiment will be described. FIG. 16 is a block diagram of a third embodiment of the simulation apparatus according to the present invention. The simulation device of FIG. 16 simultaneously simulates four microcomputer systems each including a processor core, a program / data memory, and a peripheral circuit simulator.
[0061]
In FIG. 16, a system A simulation unit 111a includes a processor simulation unit 112a, a synchronization information management unit 114a, a program / data memory 115a, an external interrupt generation unit 116a, and a peripheral circuit simulation unit 121a. Similarly, the system B simulation unit 111b includes a processor simulation unit 112b, a synchronization information management unit 114b, a program / data memory 115b, an external interrupt generation unit 116b, and a peripheral circuit simulation unit 121b. The system D simulation unit 111d includes a processor simulation unit 112d, a synchronization information management unit 114d, a synchronization information management unit 114c, a program / data memory 115c, an external interrupt generation unit 116c, and a peripheral circuit simulation unit 121c. It has a program / data memory 115d, an external interrupt generating means 116d, and a peripheral circuit simulating means 121d.
[0062]
The simulation execution management unit 302 controls a simulation execution operation in the system A simulation unit 111a, a simulation execution operation in the system B simulation unit 111b, a simulation execution operation in the system C simulation unit 111c, and a simulation execution operation in the system D simulation unit 111d. The simulation execution management unit 302 includes the simulator activation unit 103, the inter-system synchronization information management unit 304, and the bus control unit 108. The inter-system synchronization information management unit 304 includes a system A time management unit 105 corresponding to the system A simulation unit 111a, a system B time management unit 106 corresponding to the system B simulation unit 111b, and a system corresponding to the system C simulation unit 111c. It has a C time management unit 305 and a system D time management unit 306 corresponding to the system D simulation unit 111d.
[0063]
In the present embodiment, the number of systems to be subjected to the simultaneous operation simulation is four, but in general, the number can be expanded to n (n is an integer of 2 or more). Regarding the operation, Steps S3 and S4 in FIG. 3 may be replaced with n system simulation steps each having the same sub-steps as Step S3 (or Step S4), and a detailed description thereof will be omitted. Preferably, when the number of systems is increased to n, the system whose assumed operating frequency is the highest (that is, the system whose clock time is the smallest) for each reference time operation is controlled under the control of the simulation execution management unit 302. The simulation is performed in the order of the system with the smallest assumed operating frequency (that is, the system with the largest one clock time).
[0064]
In the third embodiment of FIG. 16 as well, the simulation that emphasizes the accuracy of the simultaneous operation is executed by adopting the shortest one clock time of the systems A to D as the reference operation time as in the first embodiment. Alternatively, as in the second embodiment, a simulation may be executed in which the largest one clock time of the systems A to D is adopted as the reference operation time to prioritize the improvement of the simulation speed. .
[0065]
Next, a fourth embodiment of the present invention will be described. FIG. 17 is a block diagram of the fourth embodiment. In FIG. 17, a DMA (direct memory access) circuit simulator 432a is provided in a peripheral circuit simulation unit 421a of the system A simulation unit 411a, and a DMA (direct memory access) is provided in the peripheral circuit simulation unit 421b of the system B simulation unit 411b. By providing the circuit simulator 432b and the virtual shared memory 431 in the bus control unit 408, it is possible to simulate high-speed communication between the system A simulation unit 411a and the system B simulation unit 411b.
[0066]
The use of the virtual shared memory is described in the start information file 101, and when the simulation execution management unit 402 is started, the virtual shared memory 431 is prepared in the bus control unit 408. When the clock number is notified from the system A time management unit 105 of the inter-system synchronization information management unit 104 to the synchronization information management unit 114a of the system A simulation unit 411a, the clock number is taken from the program / data memory 115a into the processor simulation unit 112a. If the transferred program is a program that performs a direct memory access operation, the DMA circuit simulator 432a notifies the virtual memory sharing unit 431 of the contents of the memory to be transferred. The virtual shared memory unit 431 holds the contents, and notifies the synchronization information management unit 114b of the system B simulation unit 411b of the number of clocks (the quotient of the sub-step 45 in FIG. 3) from the inter-system synchronization information management unit 104. When the program unit 112b reads the program for performing the direct memory access operation from the program / data memory 115b, the contents of the memory held in the virtual shared memory unit 431 are transferred to the program / data memory 115b through the DMA circuit simulator 432b. Forward.
[0067]
Next, a fifth embodiment of the present invention will be described. FIG. 18 is a block diagram of the fifth embodiment. In FIG. 18, a timer output periodically generated by the timer circuit simulator 118a mounted on the system A simulation unit 511a is used as an assumed operation clock of the serial input / output circuit simulator 120b mounted on the system B simulation unit 511b. A simulation of the case is possible.
[0068]
When the connection destination of the terminal output from the system A simulation unit 511a described in the startup information file 101 is the clock generator of the system B simulation unit 511b, the simulation execution management unit 102 changes the connection destination of the bus control unit 108 to the system B This is set in the synchronization information management unit 114b of the simulation unit 511b. When a timer output is generated in the timer circuit simulator means 118a in the peripheral circuit simulation means 521a of the system A simulation section 511a, the timer circuit simulator means 118 transmits the timer output information to the bus control means 108 of the simulation execution management section 102. Then, the bus control unit 108 holds the timer output information. When an operation clock is requested from the serial input / output circuit simulator 120b in the peripheral circuit simulating unit 521b during the simulation of the system B simulation unit 511b, the synchronization information managing unit 114b holds the request to the bus control unit 108. Request disclosure of information. The synchronization information management means 114b transmits the received timer output information to the serial input / output circuit simulator means 120b, and the serial input / output circuit simulator means 120b simulates using the timer output information as an operation clock.
[0069]
Note that the simulation apparatus of the present invention may be realized as one dedicated hardware including a simulation execution management unit and a plurality of system simulation units, but a general-purpose computer and a program having the functions of the simulation execution management unit. You may comprise using the program which has each function of several system simulation parts. Further, for example, a plurality of programs such as a program for the function of the system A simulation unit and a program for the function of the simulation execution management unit are mounted on one computer, and a program for the function of the system B simulation unit is mounted on another computer. The computers may be connected to each other via a network, and a simulation device having such a configuration can execute a simulation at a higher speed.
[0070]
Furthermore, by incorporating information on whether to perform speed-priority simulation or accuracy-priority simulation into the startup information file 101, the simulation execution management unit 102 determines at startup the information from the information read from the startup information file. The simulation can be executed with the accuracy and speed desired by the user. In addition, if information on the timing of switching from speed priority to accuracy priority or the timing of switching from accuracy priority to speed priority is added, it is possible to execute a combination of speed priority and accuracy priority simulation.
[0071]
【The invention's effect】
As described above, by applying the present invention, it is possible to simulate the simultaneous operation of a plurality of microcomputer systems each including a processor core having a different operation frequency. Thus, even when signals such as data, clocks, and interrupts are transmitted and received between microcomputer systems having different operating frequencies, it is possible to correctly simulate the operation of each microcomputer system. Furthermore, by adjusting the setting of the reference operation time, it is possible to select whether to emphasize the accuracy of the operation synchronization or to give priority to the simulation speed depending on the purpose of the simulation. large.
[Brief description of the drawings]
FIG. 1 is a block diagram of a simulation apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram for explaining the operation of the present invention.
FIG. 3 is a flowchart showing the operation of the simulation device of the present invention.
FIG. 4 is a diagram showing a state of each block during operation of the first embodiment.
FIG. 5 is a diagram showing a state of each block during operation of the first embodiment.
FIG. 6 is a diagram showing a state of each block during operation of the first embodiment.
FIG. 7 is a diagram illustrating a state of each block during operation of the first embodiment.
FIG. 8 is a diagram illustrating a state of each block during operation of the first embodiment.
FIG. 9 is a diagram illustrating a state of each block during operation of the first embodiment.
FIG. 10 is a diagram showing a state of each block during operation of the second embodiment.
FIG. 11 is a diagram showing a state of each block during operation of the second embodiment.
FIG. 12 is a diagram illustrating a state of each block during operation of the second embodiment.
FIG. 13 is a diagram illustrating a state of each block during operation of the second embodiment.
FIG. 14 is a diagram illustrating a state of each block during operation of the second embodiment.
FIG. 15 is a diagram illustrating a state of each block during operation of the second embodiment.
FIG. 16 is a block diagram of a third embodiment of the simulation device of the present invention.
FIG. 17 is a block diagram of a fourth embodiment of the simulation device according to the present invention.
FIG. 18 is a block diagram of a fifth embodiment of the simulation apparatus according to the present invention.
FIG. 19 is a block diagram of a conventional simulation device.
[Explanation of symbols]
101 Startup information file
102, 302, 402 Simulation execution management unit
103 Simulator activation means
104, 304 inter-system synchronization information management means
105, 106, 305, 306 Time management means
107 Reference operation time storage means
108,408 Bus control means
111a, 111b, 111c, 111d, 411a, 411b, 511a, 511b Simulation unit
112a, 112b, 112c, 112d Processor simulating means
114a, 114b, 114c, 114d Synchronization information management means
115a, 115b, 115c, 115d Program / data memory
121a, 121b, 121c, 121d, 421a, 421b, 521a, 521b Peripheral circuit simulation means

Claims (14)

命令実行シミュレーションするプロセッサシミュレート手段をそれぞれに備える複数のシステムシミュレーション部と、
前記複数のシステムシミュレーション部のそれぞれに対応して設けられシステムシミュレーション部のシミュレーションの進行を管理するシステム時間管理手段と、前記複数のシステムシミュレーション部それぞれの動作クロックの周期にあたる1クロック時間の中で最も大きい1クロック時間以下で且つ最も小さい1クロック時間以上の範囲内で設定された基準動作時間を格納する手段と、を備え、前記基準動作時間毎に前記複数のシステムシミュレーション部のシミュレーション実行の順序を所定の順序に制御するシミュレーション実行管理部と、
を有することを特徴とするシミュレーション装置。
A plurality of system simulation units each including processor simulation means for performing instruction execution simulation,
A system time management unit provided corresponding to each of the plurality of system simulation units and managing the progress of the simulation of the system simulation unit; Means for storing a reference operation time set within a range of not more than one large clock time and not less than one minimum clock time, wherein the order of execution of simulation by the plurality of system simulation units is determined for each of the reference operation times. A simulation execution management unit for controlling in a predetermined order;
A simulation device comprising:
前記基準動作時間は、前記複数のシステムシミュレーション部のそれぞれの1クロック時間のうち最も小さいものに設定されることを特徴とする請求項1に記載のシミュレーション装置。The simulation apparatus according to claim 1, wherein the reference operation time is set to the shortest one of one clock time of each of the plurality of system simulation units. 前記基準動作時間は、前記複数のシステムシミュレーション部のそれぞれの1クロック時間のうち最も大きいものに設定されることを特徴とする請求項1に記載のシミュレーション装置。The simulation apparatus according to claim 1, wherein the reference operation time is set to the longest one of one clock time of each of the plurality of system simulation units. 命令実行シミュレーションするプロセッサシミュレート手段と、プロセッサシミュレート手段の命令実行に応じて起動される周辺回路の動作をシミュレーションする周辺回路シミュレート手段とをそれぞれに備える複数のシステムシミュレーション部と、
前記複数のシステムシミュレーション部のそれぞれに対応して設けられシステムシミュレーション部のシミュレーションの進行を管理するシステム時間管理手段と、前記複数のシステムシミュレーション部それぞれの動作クロックの周期にあたる1クロック時間の中で最も大きい1クロック時間以下で且つ最も小さい1クロック時間以上の範囲内で設定された基準動作時間を格納する手段と、前記複数のシステムシミュレーション部の周辺回路シミュレート手段の相互間の入出力を制御するバス制御手段とを備え、前記基準動作時間毎に前記複数のシステムシミュレーション部のシミュレーション実行の順序を所定の順序に制御するシミュレーション実行管理部と、
を有することを特徴とするシミュレーション装置。
A plurality of system simulation units each including a processor simulating unit for simulating an instruction execution, and a peripheral circuit simulating unit for simulating an operation of a peripheral circuit activated in accordance with the instruction execution of the processor simulating unit;
A system time management unit provided corresponding to each of the plurality of system simulation units and managing the progress of the simulation of the system simulation unit; Means for storing a reference operation time set within a range of not more than a large one clock time and not less than a smallest one clock time, and controlling input / output between the peripheral circuit simulating means of the plurality of system simulation units. A simulation execution management unit comprising a bus control unit, and controlling a simulation execution order of the plurality of system simulation units in a predetermined order for each of the reference operation times;
A simulation device comprising:
前記バス制御手段は仮想共有メモリを有し、
前記複数のシステムシミュレーション部のうち少なくとも2つのシステムシミュレーション部がダイナミック・メモリ・アクセス回路シミュレータと、該ダイナミック・メモリ・アクセス回路と前記バス制御手段との間のデータ送受信手段を備え、
一方のシステムシミュレーション部のダイナミック・メモリ・アクセス回路シミュレータから前記仮想共有メモリにデータを送る動作と他方のシステムシミュレーション部のダイナミック・メモリ・アクセス回路シミュレータが前記仮想共有メモリからデータを受ける動作とをシミュレーションすることによりダイナミック・メモリ・アクセス・プログラムの実行をシミュレーションすることを特徴とするシミュレーション装置。
The bus control means has a virtual shared memory,
At least two of the plurality of system simulation units include a dynamic memory access circuit simulator and a data transmission / reception unit between the dynamic memory access circuit and the bus control unit,
Simulating the operation of sending data from the dynamic memory access circuit simulator of one system simulation unit to the virtual shared memory and the operation of receiving the data from the virtual shared memory by the dynamic memory access circuit simulator of the other system simulation unit A simulation device for simulating the execution of the dynamic memory access program.
前記複数のシステムシミュレーション部のうち少なくとも1つのシステムシミュレーション部が、タイマ回路シミュレータと該タイマ回路シミュレータから前記バス制御手段にタイマ出力情報を送る手段を備え、
前記複数のシステムシミュレーション部のうち他の少なくとも1つのシステムシミュレーション部が、前記バス制御手段から前記タイマ出力情報を取得する同期情報管理手段と前記同期情報管理手段からの出力タイマ情報に基づく動作クロック情報に同期してシミュレーションを行う入出力回路シミュレータとを備えることを特徴とするシミュレーション装置。
At least one system simulation unit of the plurality of system simulation units includes a timer circuit simulator and a unit that sends timer output information from the timer circuit simulator to the bus control unit,
At least one other of the plurality of system simulation units is a synchronization information management unit that acquires the timer output information from the bus control unit, and operation clock information based on output timer information from the synchronization information management unit. And an input / output circuit simulator for performing a simulation in synchronization with the simulation.
前記基準動作時間は、前記複数のシステムシミュレーション部のそれぞれの1クロック時間のうち最も小さいものに設定されることを特徴とする請求項4,5または6に記載のシミュレーション装置。7. The simulation apparatus according to claim 4, wherein the reference operation time is set to a shortest one of one clock time of each of the plurality of system simulation units. 前記基準動作時間は、前記複数のシステムシミュレーション部のそれぞれの1クロック時間のうち最も大きいものに設定されることを特徴とする請求項4,5または6に記載のシミュレーション装置。7. The simulation apparatus according to claim 4, wherein the reference operation time is set to be the largest of one clock time of each of the plurality of system simulation units. 前記所定の順序が、前記複数のシステムシミュレーション部のうち1クロック時間が最も小さいシステムシミュレーション部が最初で1クロック時間の小さい順に1クロック時間が最も大きいシステムシミュレーション部が最後となる順序であること特徴とする請求項4,5または6に記載のシミュレーション装置。The predetermined order is a sequence in which the system simulation unit having the smallest one clock time among the plurality of system simulation units is first, and the system simulation unit having the largest one clock time is last in the order of decreasing one clock time. The simulation device according to claim 4, 5 or 6, wherein 複数のシステムでのプログラムの実行をコンピュータを用いてシミュレーションする方法であって、
前記複数のシステムのそれぞれの想定クロック周波数から周期に当たる1クロック時間を算出し最も大きい1クロック時間以下で且つ最も小さい1クロック時間以上の範囲内で基準動作時間を選択して設定する第1の手順と、
前記複数のシステムのそれぞれに対応して設けられた内部時計に記憶された時間に前記基準動作時間を加算する第2の手順と、
前記複数のシステムのそれぞれに対して対応する内部時計に含まれるクロック数だけプログラム実行のシミュレーションを進める第3の手順と、
を有することを特徴とするシミュレーション方法。
A method of simulating the execution of a program in a plurality of systems by using a computer,
A first procedure of calculating one clock time corresponding to a cycle from each assumed clock frequency of the plurality of systems and selecting and setting a reference operation time within a range of not more than the largest one clock time and not less than the smallest one clock time. When,
A second procedure of adding the reference operation time to a time stored in an internal clock provided corresponding to each of the plurality of systems;
A third procedure for simulating program execution by the number of clocks included in a corresponding internal clock for each of the plurality of systems;
A simulation method comprising:
前記第3の手順は、
内部時計に記憶された時間がシミュレーション対象のシステムの1クロック時間以上であるかを判断する第1のサブステップと、
不足クロック数が記録されていない場合には前記内部時計に含まれるクロック数だけ命令のシミュレーションを進め不足クロック数が記録されている場合には前記内部時計に含まれるクロック数から不足クロック数を差し引いたクロック数だけ命令のシミュレーションを進める第2のサブステップと、
前記第2のサブステップで実行する命令に対してクロック数が不足である場合にはクロック数の不足分を不足クロック数として記憶する第3のサブステップとを備えるステップを有し、
前記ステップを前記複数のシステムに対して所定の順序で行うことを特徴とする請求項10に記載のシミュレーション方法。
The third procedure includes:
A first sub-step of determining whether the time stored in the internal clock is greater than or equal to one clock time of the system to be simulated;
When the number of insufficient clocks is not recorded, the instruction simulation is performed by the number of clocks included in the internal clock. When the number of insufficient clocks is recorded, the number of insufficient clocks is subtracted from the number of clocks included in the internal clock. A second sub-step for advancing the instruction simulation by the number of clocks set,
And a third sub-step of storing the lack of the number of clocks as the number of insufficient clocks when the number of clocks is insufficient for the instruction to be executed in the second sub-step,
The method according to claim 10, wherein the steps are performed on the plurality of systems in a predetermined order.
前記基準動作時間は、前記複数のシステムのそれぞれの1クロック時間のうち最も小さいものに設定されることを特徴とする請求項11に記載のシミュレーション方法。12. The simulation method according to claim 11, wherein the reference operation time is set to the shortest one of one clock time of each of the plurality of systems. 前記基準動作時間は、前記複数のシステムのそれぞれの1クロック時間のうち最も大きいものに設定されることを特徴とする請求項11に記載のシミュレーション方法。12. The simulation method according to claim 11, wherein the reference operation time is set to the largest one of one clock time of each of the plurality of systems. 前記所定の順序が、前記複数のシステムシのうち1クロック時間が最も小さいシステムが最初で1クロック時間の小さい順に1クロック時間が最も大きいシステムシが最後となる順序であること特徴とする請求項11記載のシミュレーション方法。5. The system according to claim 1, wherein the predetermined order is a system in which the system with the shortest clock time is the first among the plurality of systems, and the system with the largest one clock time is the last in the order with the smallest clock time. 12. The simulation method according to item 11.
JP2002179733A 2002-06-20 2002-06-20 Simultaneous simulation apparatus and simultaneous simulation method for multiple processors Expired - Fee Related JP3960866B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002179733A JP3960866B2 (en) 2002-06-20 2002-06-20 Simultaneous simulation apparatus and simultaneous simulation method for multiple processors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002179733A JP3960866B2 (en) 2002-06-20 2002-06-20 Simultaneous simulation apparatus and simultaneous simulation method for multiple processors

Publications (2)

Publication Number Publication Date
JP2004021904A true JP2004021904A (en) 2004-01-22
JP3960866B2 JP3960866B2 (en) 2007-08-15

Family

ID=31177067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002179733A Expired - Fee Related JP3960866B2 (en) 2002-06-20 2002-06-20 Simultaneous simulation apparatus and simultaneous simulation method for multiple processors

Country Status (1)

Country Link
JP (1) JP3960866B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328548A (en) * 2006-06-07 2007-12-20 Canon Inc Simulator device, simulation method and computer program
CN107005444A (en) * 2014-09-11 2017-08-01 森特理克联网家居有限公司 Equipment is synchronous and tests
US10776139B2 (en) 2015-05-29 2020-09-15 Mitsubishi Electric Corporation Simulation apparatus, simulation method, and computer readable medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328548A (en) * 2006-06-07 2007-12-20 Canon Inc Simulator device, simulation method and computer program
US8108192B2 (en) 2006-06-07 2012-01-31 Canon Kabushiki Kaisha Simulator apparatus and simulation method
CN107005444A (en) * 2014-09-11 2017-08-01 森特理克联网家居有限公司 Equipment is synchronous and tests
US10474116B2 (en) 2014-09-11 2019-11-12 Centrica Hive Limited Device synchronization and testing
CN107005444B (en) * 2014-09-11 2020-06-12 森特理克联网家居有限公司 Device synchronization and testing
US10776139B2 (en) 2015-05-29 2020-09-15 Mitsubishi Electric Corporation Simulation apparatus, simulation method, and computer readable medium

Also Published As

Publication number Publication date
JP3960866B2 (en) 2007-08-15

Similar Documents

Publication Publication Date Title
JP3936737B2 (en) System and method for generating pseudo-random instructions for design confirmation
CN101676874B (en) Licy-based hypervisor configuration management
US6058492A (en) Method and apparatus for design verification using emulation and simulation
JP4564110B2 (en) Computer-implemented method and signal processor simulator for simulating the operation of dual processor circuits
US4275441A (en) Microprogram control system for microprogram debugging
JP2000040745A (en) Method for reconstituting hardware set and hardware device to be reconstituted
US6882968B1 (en) Method of measuring performance of an emulator and for adjusting emulator operation in response thereto
CN111859834B (en) UVM-based verification platform development method, system, terminal and storage medium
CA2671547A1 (en) Simulation techniques in a distributed computer system for multiplayer games
JP2011134275A (en) Scheduler program, distributed simulation system, and scheduler
CN114168255A (en) Operation method and device of heterogeneous instruction set container in container cloud platform
Koranne et al. A novel reconfigurable wrapper for testing of embedded core-based SOCs and its associated scheduling algorithm
US7050958B1 (en) Method and apparatus for accelerating hardware simulation
US7319947B1 (en) Method and apparatus for performing distributed simulation utilizing a simulation backplane
US9996645B2 (en) Method and apparatus for modeling delays in emulation
US5734927A (en) System having registers for receiving data, registers for transmitting data, both at a different clock rate, and control circuitry for shifting the different clock rates
JP2002132496A (en) Emulating apparatus and parts, emulation method, recording medium, and program
JP3960866B2 (en) Simultaneous simulation apparatus and simultaneous simulation method for multiple processors
JP6277279B2 (en) Dynamic interconnect using partitioning and platform prototyping in emulation
Schirner et al. Result-oriented modeling—A novel technique for fast and accurate TLM
US6782355B1 (en) Apparatus for improving concurrent behavior modeling with emulation
JP3472067B2 (en) Design support equipment
US7464017B2 (en) Time multiplexed interface for emulator system
JP2004021907A (en) Simulation system for performance evaluation
US20030226051A1 (en) System large scale integrated circuit (LSI), method of designing the same, and program therefor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040827

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050525

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060308

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060404

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060508

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20060712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070320

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070329

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: 20070424

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070515

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: 20100525

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20100525

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20100525

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110525

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120525

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120525

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130525

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140525

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees